diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-05-15 11:16:10 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-12 14:28:05 +0100 |
commit | e176bb05fec4c00450302a75e81f8da3dc9e309e (patch) | |
tree | 85b04f821ceb53f1aaf7289cecc6af0370912559 /arch/arm/mach-pxa/pxa25x.c | |
parent | b23170c01f6e4ea043df7cd9486c2488e01f3d60 (diff) |
[ARM] pxa: move pm_ops structure into CPU specific files
Move the pm_ops structure into the PXA25x and PXA27x support
files. Remove the old pxa_pm_prepare() function, and rename
the both pxa_cpu_pm_prepare() functions as pxa_pm_prepare().
We'll fix that later.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index c1f21739bf7..8560439ba0b 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -23,6 +23,7 @@ #include <asm/hardware.h> #include <asm/arch/pxa-regs.h> +#include <asm/arch/pm.h> #include "generic.h" @@ -105,7 +106,7 @@ EXPORT_SYMBOL(get_lcdclk_frequency_10khz); #ifdef CONFIG_PM -int pxa_cpu_pm_prepare(suspend_state_t state) +int pxa_pm_prepare(suspend_state_t state) { switch (state) { case PM_SUSPEND_MEM: @@ -133,4 +134,21 @@ void pxa_cpu_pm_enter(suspend_state_t state) } } +static struct pm_ops pxa25x_pm_ops = { + .prepare = pxa_pm_prepare, + .enter = pxa_pm_enter, + .valid = pm_valid_only_mem, +}; #endif + +static int __init pxa25x_init(void) +{ + if (cpu_is_pxa21x() || cpu_is_pxa25x()) { +#ifdef CONFIG_PM + pm_set_ops(&pxa25x_pm_ops); +#endif + } + return 0; +} + +subsys_initcall(pxa25x_init); |