diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2009-05-14 11:27:00 +0200 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-06-05 10:43:29 +0800 |
commit | fc9c1b6fc874d786f32163291b059ec574698aa2 (patch) | |
tree | de8c97f99e4218684512050305be22e503f3fc07 /arch/arm/mach-pxa/palmtx.c | |
parent | 37330efd4abb474b3fdfacea68beb37cf67564ed (diff) | |
download | op-kernel-dev-fc9c1b6fc874d786f32163291b059ec574698aa2.zip op-kernel-dev-fc9c1b6fc874d786f32163291b059ec574698aa2.tar.gz |
[ARM] pxa/palm: Palm TX, T5, LD suspend-to-mem rework
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-rw-r--r-- | arch/arm/mach-pxa/palmtx.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 3ed5ae0..6c15d84 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -491,30 +491,18 @@ static struct pxafb_mach_info palmtx_lcd_screen = { /****************************************************************************** * Power management - standby ******************************************************************************/ -#ifdef CONFIG_PM -static u32 *addr __initdata; -static u32 resume[3] __initdata = { - 0xe3a00101, /* mov r0, #0x40000000 */ - 0xe380060f, /* orr r0, r0, #0x00f00000 */ - 0xe590f008, /* ldr pc, [r0, #0x08] */ -}; - -static int __init palmtx_pm_init(void) +static void __init palmtx_pm_init(void) { - int i; - - /* this is where the bootloader jumps */ - addr = phys_to_virt(PALMTX_STR_BASE); - - for (i = 0; i < 3; i++) - addr[i] = resume[i]; - - return 0; + static u32 resume[] = { + 0xe3a00101, /* mov r0, #0x40000000 */ + 0xe380060f, /* orr r0, r0, #0x00f00000 */ + 0xe590f008, /* ldr pc, [r0, #0x08] */ + }; + + /* copy the bootloader */ + memcpy(phys_to_virt(PALMTX_STR_BASE), resume, sizeof(resume)); } -device_initcall(palmtx_pm_init); -#endif - /****************************************************************************** * Machine init ******************************************************************************/ @@ -557,6 +545,7 @@ static void __init palmtx_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); + palmtx_pm_init(); set_pxa_fb_info(&palmtx_lcd_screen); pxa_set_mci_info(&palmtx_mci_platform_data); palmtx_udc_init(); |