aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/palmtx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-rw-r--r--arch/arm/mach-pxa/palmtx.c46
1 files changed, 37 insertions, 9 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index b490c0924619..14393d0ad8b8 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -64,6 +64,7 @@ static unsigned long palmtx_pin_config[] __initdata = {
64 GPIO29_AC97_SDATA_IN_0, 64 GPIO29_AC97_SDATA_IN_0,
65 GPIO30_AC97_SDATA_OUT, 65 GPIO30_AC97_SDATA_OUT,
66 GPIO31_AC97_SYNC, 66 GPIO31_AC97_SYNC,
67 GPIO95_AC97_nRESET,
67 68
68 /* IrDA */ 69 /* IrDA */
69 GPIO40_GPIO, /* ir disable */ 70 GPIO40_GPIO, /* ir disable */
@@ -75,7 +76,7 @@ static unsigned long palmtx_pin_config[] __initdata = {
75 76
76 /* USB */ 77 /* USB */
77 GPIO13_GPIO, /* usb detect */ 78 GPIO13_GPIO, /* usb detect */
78 GPIO95_GPIO, /* usb power */ 79 GPIO93_GPIO, /* usb power */
79 80
80 /* PCMCIA */ 81 /* PCMCIA */
81 GPIO48_nPOE, 82 GPIO48_nPOE,
@@ -93,10 +94,10 @@ static unsigned long palmtx_pin_config[] __initdata = {
93 GPIO116_GPIO, /* wifi ready */ 94 GPIO116_GPIO, /* wifi ready */
94 95
95 /* MATRIX KEYPAD */ 96 /* MATRIX KEYPAD */
96 GPIO100_KP_MKIN_0, 97 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
97 GPIO101_KP_MKIN_1, 98 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
98 GPIO102_KP_MKIN_2, 99 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
99 GPIO97_KP_MKIN_3, 100 GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
100 GPIO103_KP_MKOUT_0, 101 GPIO103_KP_MKOUT_0,
101 GPIO104_KP_MKOUT_1, 102 GPIO104_KP_MKOUT_1,
102 GPIO105_KP_MKOUT_2, 103 GPIO105_KP_MKOUT_2,
@@ -359,7 +360,7 @@ static struct pxaficp_platform_data palmtx_ficp_platform_data = {
359static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = { 360static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = {
360 .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N, 361 .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N,
361 .gpio_vbus_inverted = 1, 362 .gpio_vbus_inverted = 1,
362 .gpio_pullup = GPIO_NR_PALMTX_USB_POWER, 363 .gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP,
363 .gpio_pullup_inverted = 0, 364 .gpio_pullup_inverted = 0,
364}; 365};
365 366
@@ -459,6 +460,33 @@ static struct pxafb_mach_info palmtx_lcd_screen = {
459}; 460};
460 461
461/****************************************************************************** 462/******************************************************************************
463 * Power management - standby
464 ******************************************************************************/
465#ifdef CONFIG_PM
466static u32 *addr __initdata;
467static u32 resume[3] __initdata = {
468 0xe3a00101, /* mov r0, #0x40000000 */
469 0xe380060f, /* orr r0, r0, #0x00f00000 */
470 0xe590f008, /* ldr pc, [r0, #0x08] */
471};
472
473static int __init palmtx_pm_init(void)
474{
475 int i;
476
477 /* this is where the bootloader jumps */
478 addr = phys_to_virt(PALMTX_STR_BASE);
479
480 for (i = 0; i < 3; i++)
481 addr[i] = resume[i];
482
483 return 0;
484}
485
486device_initcall(palmtx_pm_init);
487#endif
488
489/******************************************************************************
462 * Machine init 490 * Machine init
463 ******************************************************************************/ 491 ******************************************************************************/
464static struct platform_device *devices[] __initdata = { 492static struct platform_device *devices[] __initdata = {
@@ -487,9 +515,9 @@ static void __init palmtx_map_io(void)
487/* setup udc GPIOs initial state */ 515/* setup udc GPIOs initial state */
488static void __init palmtx_udc_init(void) 516static void __init palmtx_udc_init(void)
489{ 517{
490 if (!gpio_request(GPIO_NR_PALMTX_USB_POWER, "UDC Vbus")) { 518 if (!gpio_request(GPIO_NR_PALMTX_USB_PULLUP, "UDC Vbus")) {
491 gpio_direction_output(GPIO_NR_PALMTX_USB_POWER, 1); 519 gpio_direction_output(GPIO_NR_PALMTX_USB_PULLUP, 1);
492 gpio_free(GPIO_NR_PALMTX_USB_POWER); 520 gpio_free(GPIO_NR_PALMTX_USB_PULLUP);
493 } 521 }
494} 522}
495 523