diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2009-03-28 07:37:42 -0400 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-04-03 22:26:34 -0400 |
commit | 81854f82c5c1a203b2f5c94f6aa2ed8b8e19f025 (patch) | |
tree | 2eac472ee815f31cfeca6ab396c6cd6347dc2871 /arch/arm/mach-pxa | |
parent | 8c8aa5fa3060abc17e8a07d15f575485f6a0c0b8 (diff) |
[ARM] pxa: Add support for suspend on PalmTX, T5 and LD
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')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/palmld.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/palmt5.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/palmtx.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmld.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmt5.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmtx.c | 35 |
6 files changed, 98 insertions, 12 deletions
diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/include/mach/palmld.h index 7c295a48d784..fb13c82ad6dc 100644 --- a/arch/arm/mach-pxa/include/mach/palmld.h +++ b/arch/arm/mach-pxa/include/mach/palmld.h | |||
@@ -87,6 +87,7 @@ | |||
87 | #define PALMLD_IDE_SIZE 0x00100000 | 87 | #define PALMLD_IDE_SIZE 0x00100000 |
88 | 88 | ||
89 | #define PALMLD_PHYS_IO_START 0x40000000 | 89 | #define PALMLD_PHYS_IO_START 0x40000000 |
90 | #define PALMLD_STR_BASE 0xa0200000 | ||
90 | 91 | ||
91 | /* BATTERY */ | 92 | /* BATTERY */ |
92 | #define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */ | 93 | #define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V maximum voltage */ |
diff --git a/arch/arm/mach-pxa/include/mach/palmt5.h b/arch/arm/mach-pxa/include/mach/palmt5.h index 94db2881f048..052bfe788ada 100644 --- a/arch/arm/mach-pxa/include/mach/palmt5.h +++ b/arch/arm/mach-pxa/include/mach/palmt5.h | |||
@@ -59,6 +59,7 @@ | |||
59 | /* Various addresses */ | 59 | /* Various addresses */ |
60 | #define PALMT5_PHYS_RAM_START 0xa0000000 | 60 | #define PALMT5_PHYS_RAM_START 0xa0000000 |
61 | #define PALMT5_PHYS_IO_START 0x40000000 | 61 | #define PALMT5_PHYS_IO_START 0x40000000 |
62 | #define PALMT5_STR_BASE 0xa0200000 | ||
62 | 63 | ||
63 | /* TOUCHSCREEN */ | 64 | /* TOUCHSCREEN */ |
64 | #define AC97_LINK_FRAME 21 | 65 | #define AC97_LINK_FRAME 21 |
diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h index 1e8bccbda510..9f7d62fb4cbb 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/include/mach/palmtx.h | |||
@@ -78,6 +78,8 @@ | |||
78 | #define PALMTX_PHYS_RAM_START 0xa0000000 | 78 | #define PALMTX_PHYS_RAM_START 0xa0000000 |
79 | #define PALMTX_PHYS_IO_START 0x40000000 | 79 | #define PALMTX_PHYS_IO_START 0x40000000 |
80 | 80 | ||
81 | #define PALMTX_STR_BASE 0xa0200000 | ||
82 | |||
81 | #define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */ | 83 | #define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */ |
82 | #define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */ | 84 | #define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */ |
83 | 85 | ||
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c index 8587477a9bb7..ecf5910e39d7 100644 --- a/arch/arm/mach-pxa/palmld.c +++ b/arch/arm/mach-pxa/palmld.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/wm97xx_batt.h> | 25 | #include <linux/wm97xx_batt.h> |
26 | #include <linux/power_supply.h> | 26 | #include <linux/power_supply.h> |
27 | #include <linux/sysdev.h> | ||
27 | 28 | ||
28 | #include <asm/mach-types.h> | 29 | #include <asm/mach-types.h> |
29 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
@@ -68,10 +69,10 @@ static unsigned long palmld_pin_config[] __initdata = { | |||
68 | GPIO47_FICP_TXD, | 69 | GPIO47_FICP_TXD, |
69 | 70 | ||
70 | /* MATRIX KEYPAD */ | 71 | /* MATRIX KEYPAD */ |
71 | GPIO100_KP_MKIN_0, | 72 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
72 | GPIO101_KP_MKIN_1, | 73 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, |
73 | GPIO102_KP_MKIN_2, | 74 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, |
74 | GPIO97_KP_MKIN_3, | 75 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, |
75 | GPIO103_KP_MKOUT_0, | 76 | GPIO103_KP_MKOUT_0, |
76 | GPIO104_KP_MKOUT_1, | 77 | GPIO104_KP_MKOUT_1, |
77 | GPIO105_KP_MKOUT_2, | 78 | GPIO105_KP_MKOUT_2, |
@@ -507,6 +508,33 @@ static struct pxafb_mach_info palmld_lcd_screen = { | |||
507 | }; | 508 | }; |
508 | 509 | ||
509 | /****************************************************************************** | 510 | /****************************************************************************** |
511 | * Power management - standby | ||
512 | ******************************************************************************/ | ||
513 | #ifdef CONFIG_PM | ||
514 | static u32 *addr __initdata; | ||
515 | static u32 resume[3] __initdata = { | ||
516 | 0xe3a00101, /* mov r0, #0x40000000 */ | ||
517 | 0xe380060f, /* orr r0, r0, #0x00f00000 */ | ||
518 | 0xe590f008, /* ldr pc, [r0, #0x08] */ | ||
519 | }; | ||
520 | |||
521 | static int __init palmld_pm_init(void) | ||
522 | { | ||
523 | int i; | ||
524 | |||
525 | /* this is where the bootloader jumps */ | ||
526 | addr = phys_to_virt(PALMLD_STR_BASE); | ||
527 | |||
528 | for (i = 0; i < 3; i++) | ||
529 | addr[i] = resume[i]; | ||
530 | |||
531 | return 0; | ||
532 | } | ||
533 | |||
534 | device_initcall(palmld_pm_init); | ||
535 | #endif | ||
536 | |||
537 | /****************************************************************************** | ||
510 | * Machine init | 538 | * Machine init |
511 | ******************************************************************************/ | 539 | ******************************************************************************/ |
512 | static struct platform_device *devices[] __initdata = { | 540 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 9521c7b33492..0680f1a575a3 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
@@ -75,10 +75,10 @@ static unsigned long palmt5_pin_config[] __initdata = { | |||
75 | GPIO95_GPIO, /* usb power */ | 75 | GPIO95_GPIO, /* usb power */ |
76 | 76 | ||
77 | /* MATRIX KEYPAD */ | 77 | /* MATRIX KEYPAD */ |
78 | GPIO100_KP_MKIN_0, | 78 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
79 | GPIO101_KP_MKIN_1, | 79 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, |
80 | GPIO102_KP_MKIN_2, | 80 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, |
81 | GPIO97_KP_MKIN_3, | 81 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, |
82 | GPIO103_KP_MKOUT_0, | 82 | GPIO103_KP_MKOUT_0, |
83 | GPIO104_KP_MKOUT_1, | 83 | GPIO104_KP_MKOUT_1, |
84 | GPIO105_KP_MKOUT_2, | 84 | GPIO105_KP_MKOUT_2, |
@@ -450,6 +450,33 @@ static struct pxafb_mach_info palmt5_lcd_screen = { | |||
450 | }; | 450 | }; |
451 | 451 | ||
452 | /****************************************************************************** | 452 | /****************************************************************************** |
453 | * Power management - standby | ||
454 | ******************************************************************************/ | ||
455 | #ifdef CONFIG_PM | ||
456 | static u32 *addr __initdata; | ||
457 | static u32 resume[3] __initdata = { | ||
458 | 0xe3a00101, /* mov r0, #0x40000000 */ | ||
459 | 0xe380060f, /* orr r0, r0, #0x00f00000 */ | ||
460 | 0xe590f008, /* ldr pc, [r0, #0x08] */ | ||
461 | }; | ||
462 | |||
463 | static int __init palmt5_pm_init(void) | ||
464 | { | ||
465 | int i; | ||
466 | |||
467 | /* this is where the bootloader jumps */ | ||
468 | addr = phys_to_virt(PALMT5_STR_BASE); | ||
469 | |||
470 | for (i = 0; i < 3; i++) | ||
471 | addr[i] = resume[i]; | ||
472 | |||
473 | return 0; | ||
474 | } | ||
475 | |||
476 | device_initcall(palmt5_pm_init); | ||
477 | #endif | ||
478 | |||
479 | /****************************************************************************** | ||
453 | * Machine init | 480 | * Machine init |
454 | ******************************************************************************/ | 481 | ******************************************************************************/ |
455 | static struct platform_device *devices[] __initdata = { | 482 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index b490c0924619..59d0c1cba556 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -93,10 +93,10 @@ static unsigned long palmtx_pin_config[] __initdata = { | |||
93 | GPIO116_GPIO, /* wifi ready */ | 93 | GPIO116_GPIO, /* wifi ready */ |
94 | 94 | ||
95 | /* MATRIX KEYPAD */ | 95 | /* MATRIX KEYPAD */ |
96 | GPIO100_KP_MKIN_0, | 96 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
97 | GPIO101_KP_MKIN_1, | 97 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, |
98 | GPIO102_KP_MKIN_2, | 98 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, |
99 | GPIO97_KP_MKIN_3, | 99 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, |
100 | GPIO103_KP_MKOUT_0, | 100 | GPIO103_KP_MKOUT_0, |
101 | GPIO104_KP_MKOUT_1, | 101 | GPIO104_KP_MKOUT_1, |
102 | GPIO105_KP_MKOUT_2, | 102 | GPIO105_KP_MKOUT_2, |
@@ -459,6 +459,33 @@ static struct pxafb_mach_info palmtx_lcd_screen = { | |||
459 | }; | 459 | }; |
460 | 460 | ||
461 | /****************************************************************************** | 461 | /****************************************************************************** |
462 | * Power management - standby | ||
463 | ******************************************************************************/ | ||
464 | #ifdef CONFIG_PM | ||
465 | static u32 *addr __initdata; | ||
466 | static u32 resume[3] __initdata = { | ||
467 | 0xe3a00101, /* mov r0, #0x40000000 */ | ||
468 | 0xe380060f, /* orr r0, r0, #0x00f00000 */ | ||
469 | 0xe590f008, /* ldr pc, [r0, #0x08] */ | ||
470 | }; | ||
471 | |||
472 | static int __init palmtx_pm_init(void) | ||
473 | { | ||
474 | int i; | ||
475 | |||
476 | /* this is where the bootloader jumps */ | ||
477 | addr = phys_to_virt(PALMTX_STR_BASE); | ||
478 | |||
479 | for (i = 0; i < 3; i++) | ||
480 | addr[i] = resume[i]; | ||
481 | |||
482 | return 0; | ||
483 | } | ||
484 | |||
485 | device_initcall(palmtx_pm_init); | ||
486 | #endif | ||
487 | |||
488 | /****************************************************************************** | ||
462 | * Machine init | 489 | * Machine init |
463 | ******************************************************************************/ | 490 | ******************************************************************************/ |
464 | static struct platform_device *devices[] __initdata = { | 491 | static struct platform_device *devices[] __initdata = { |