Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.25:
  sh: Fix up the sh64 build.
  sh: Fix up SH7710 VoIP-GW build.
  sh: Flag PMB support as EXPERIMENTAL.
  sh: Update r7780mp defconfig.
  fb: hitfb: Balance probe/remove section annotations.
  sh: hp6xx: Fix up hp6xx_apm build failure.
  fb: pvr2fb: Fix up remaining section mismatch.
  sh: Fix up section mismatches.
  sh: hp6xx: Correct APM output.
  sh: update se7780 defconfig
  sh: replace remaining __FUNCTION__ occurrences
  sh: export copy-page() to modules
  sh_ksyms_32.c update for gcc 4.3
  sh/mm/pg-sh7705.c must #include <linux/fs.h>
  • Loading branch information
Linus Torvalds committed Mar 7, 2008
2 parents 46fbdf8 + 7b9726a commit ce4796d
Show file tree
Hide file tree
Showing 32 changed files with 625 additions and 922 deletions.
7 changes: 0 additions & 7 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,6 @@ config SH_SECUREEDGE5410
This includes both the OEM SecureEdge products as well as the
SME product line.

config SH_7710VOIPGW
bool "SH7710-VOIP-GW"
depends on CPU_SUBTYPE_SH7710
help
Select this option to build a kernel for the SH7710 based
VOIP GW.

config SH_RTS7751R2D
bool "RTS7751R2D"
depends on CPU_SUBTYPE_SH7751R
Expand Down
1 change: 0 additions & 1 deletion arch/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ machdir-$(CONFIG_SH_EDOSK7705) += renesas/edosk7705
machdir-$(CONFIG_SH_HIGHLANDER) += renesas/r7780rp
machdir-$(CONFIG_SH_MIGOR) += renesas/migor
machdir-$(CONFIG_SH_SDK7780) += renesas/sdk7780
machdir-$(CONFIG_SH_7710VOIPGW) += renesas/sh7710voipgw
machdir-$(CONFIG_SH_X3PROTO) += renesas/x3proto
machdir-$(CONFIG_SH_SH4202_MICRODEV) += superh/microdev
machdir-$(CONFIG_SH_LANDISK) += landisk
Expand Down
22 changes: 16 additions & 6 deletions arch/sh/boards/hp6xx/hp6xx_apm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* bios-less APM driver for hp680
*
* Copyright 2005 (c) Andriy Skulysh <askulysh@gmail.com>
* Copyright 2008 (c) Kristoffer Ericson <kristoffer.ericson@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License.
Expand All @@ -15,17 +16,19 @@
#include <asm/adc.h>
#include <asm/hp6xx.h>

#define SH7709_PGDR 0xa400012c

/* percentage values */
#define APM_CRITICAL 10
#define APM_LOW 30

/* resonably sane values */
#define HP680_BATTERY_MAX 898
#define HP680_BATTERY_MIN 486
#define HP680_BATTERY_AC_ON 1023

#define MODNAME "hp6x0_apm"

#define PGDR 0xa400012c

static void hp6x0_apm_get_power_status(struct apm_power_info *info)
{
int battery, backup, charging, percentage;
Expand All @@ -38,17 +41,26 @@ static void hp6x0_apm_get_power_status(struct apm_power_info *info)
percentage = 100 * (battery - HP680_BATTERY_MIN) /
(HP680_BATTERY_MAX - HP680_BATTERY_MIN);

/* % of full battery */
info->battery_life = percentage;

/* We want our estimates in minutes */
info->units = 0;

/* Extremely(!!) rough estimate, we will replace this with a datalist later on */
info->time = (2 * battery);

info->ac_line_status = (battery > HP680_BATTERY_AC_ON) ?
APM_AC_ONLINE : APM_AC_OFFLINE;

pgdr = ctrl_inb(SH7709_PGDR);
pgdr = ctrl_inb(PGDR);
if (pgdr & PGDR_MAIN_BATTERY_OUT) {
info->battery_status = APM_BATTERY_STATUS_NOT_PRESENT;
info->battery_flag = 0x80;
} else if (charging < 8) {
info->battery_status = APM_BATTERY_STATUS_CHARGING;
info->battery_flag = 0x08;
info->ac_line_status = 0xff;
info->ac_line_status = 0x01;
} else if (percentage <= APM_CRITICAL) {
info->battery_status = APM_BATTERY_STATUS_CRITICAL;
info->battery_flag = 0x04;
Expand All @@ -59,8 +71,6 @@ static void hp6x0_apm_get_power_status(struct apm_power_info *info)
info->battery_status = APM_BATTERY_STATUS_HIGH;
info->battery_flag = 0x01;
}

info->units = 0;
}

static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
Expand Down
1 change: 0 additions & 1 deletion arch/sh/boards/renesas/sh7710voipgw/Makefile

This file was deleted.

94 changes: 0 additions & 94 deletions arch/sh/boards/renesas/sh7710voipgw/setup.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/sh/boards/renesas/x3proto/ilsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static void __ilsel_enable(ilsel_source_t set, unsigned int bit)
shift = mk_ilsel_shift(bit);

pr_debug("%s: bit#%d: addr - 0x%08lx (shift %d, set %d)\n",
__FUNCTION__, bit, addr, shift, set);
__func__, bit, addr, shift, set);

tmp = ctrl_inw(addr);
tmp &= ~(0xf << shift);
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/boards/superh/microdev/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static unsigned long microdev_isa_port2addr(unsigned long offset)
* safe default.
*/
printk("Warning: unexpected port in %s( offset = 0x%lx )\n",
__FUNCTION__, offset);
__func__, offset);
result = PVR;
}

Expand Down
Loading

0 comments on commit ce4796d

Please sign in to comment.