Skip to content

Commit

Permalink
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-apm
Browse files Browse the repository at this point in the history
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-apm:
  [APM] SH: Convert to use shared APM emulation.
  [APM] MIPS: Convert to use shared APM emulation.
  [APM] ARM: Convert to use shared APM emulation.
  [APM] Add shared version of APM emulation
  • Loading branch information
Linus Torvalds committed Feb 9, 2007
2 parents 2affc85 + 0a9b0db commit 2fd592e
Show file tree
Hide file tree
Showing 19 changed files with 80 additions and 1,370 deletions.
29 changes: 4 additions & 25 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config ARM
bool
default y
select RTC_LIB
select SYS_SUPPORTS_APM_EMULATION
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
Expand All @@ -17,6 +18,9 @@ config ARM
Europe. There is an ARM Linux project with a web page at
<http://www.arm.linux.org.uk/>.

config SYS_SUPPORTS_APM_EMULATION
bool

config GENERIC_TIME
bool
default n
Expand Down Expand Up @@ -856,31 +860,6 @@ menu "Power management options"

source "kernel/power/Kconfig"

config APM
tristate "Advanced Power Management Emulation"
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered laptops with
APM compliant BIOSes. If you say Y here, the system time will be
reset after a RESUME operation, the /proc/apm device will provide
battery status information, and user-space programs will receive
notification of APM "events" (e.g. battery status change).

In order to use APM, you will need supporting software. For location
and more information, read <file:Documentation/pm.txt> and the
Battery Powered Linux mini-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.

This driver does not spin down disk drives (see the hdparm(8)
manpage ("man 8 hdparm") for that), and it doesn't turn off
VESA-compliant "green" monitors.

Generally, if you don't have a battery in your machine, there isn't
much point in using this driver and you should say N. If you get
random kernel OOPSes or reboots that don't seem to be related to
anything, try disabling/enabling this option (or disabling/enabling
APM in your BIOS).

endmenu

source "net/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/common/sharpsl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/apm.h>
#include <asm/apm-emulation.h>
#include <asm/arch/pm.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/sharpsl.h>
Expand Down
1 change: 0 additions & 1 deletion arch/arm/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ obj-y := compat.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
time.o traps.o

obj-$(CONFIG_APM) += apm.o
obj-$(CONFIG_ISA_DMA_API) += dma.o
obj-$(CONFIG_ARCH_ACORN) += ecard.o
obj-$(CONFIG_FIQ) += fiq.o
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/corgi_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/apm.h>
#include <asm/apm-emulation.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/sharpsl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <asm/hardware.h>
#include <asm/mach-types.h>
#include <asm/apm.h>
#include <asm/apm-emulation.h>
#include <asm/arch/pm.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/sharpsl.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/spitz_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <asm/apm.h>
#include <asm/apm-emulation.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
#include <asm/hardware.h>
Expand Down
38 changes: 9 additions & 29 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,9 @@ config CPU_LITTLE_ENDIAN

endchoice

config SYS_SUPPORTS_APM_EMULATION
bool

config SYS_SUPPORTS_BIG_ENDIAN
bool

Expand Down Expand Up @@ -1001,6 +1004,7 @@ config SOC_AU1X00
bool
select SYS_HAS_CPU_MIPS32_R1
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_APM_EMULATION

config PNX8550
bool
Expand Down Expand Up @@ -2071,35 +2075,11 @@ config BINFMT_ELF32
bool
default y if MIPS32_O32 || MIPS32_N32

config PM
bool "Power Management support (EXPERIMENTAL)"
depends on EXPERIMENTAL && SOC_AU1X00

config APM
tristate "Advanced Power Management Emulation"
depends on PM
---help---
APM is a BIOS specification for saving power using several different
techniques. This is mostly useful for battery powered systems with
APM compliant BIOSes. If you say Y here, the system time will be
reset after a RESUME operation, the /proc/apm device will provide
battery status information, and user-space programs will receive
notification of APM "events" (e.g. battery status change).

In order to use APM, you will need supporting software. For location
and more information, read <file:Documentation/pm.txt> and the
Battery Powered Linux mini-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.

This driver does not spin down disk drives (see the hdparm(8)
manpage ("man 8 hdparm") for that), and it doesn't turn off
VESA-compliant "green" monitors.

Generally, if you don't have a battery in your machine, there isn't
much point in using this driver and you should say N. If you get
random kernel OOPSes or reboots that don't seem to be related to
anything, try disabling/enabling this option (or disabling/enabling
APM in your BIOS).
endmenu

menu "Power management options"

source "kernel/power/Kconfig"

endmenu

Expand Down
2 changes: 0 additions & 2 deletions arch/mips/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_MODULES) += mips_ksyms.o module.o

obj-$(CONFIG_APM) += apm.o

obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o
obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o
obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o
Expand Down
Loading

0 comments on commit 2fd592e

Please sign in to comment.