aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/palmt5.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/palmt5.c')
-rw-r--r--arch/arm/mach-pxa/palmt5.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 05bf979b78a6..aae64a12a734 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -26,6 +26,7 @@
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/wm97xx_batt.h> 27#include <linux/wm97xx_batt.h>
28#include <linux/power_supply.h> 28#include <linux/power_supply.h>
29#include <linux/usb/gpio_vbus.h>
29 30
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -343,11 +344,18 @@ static struct pxaficp_platform_data palmt5_ficp_platform_data = {
343/****************************************************************************** 344/******************************************************************************
344 * UDC 345 * UDC
345 ******************************************************************************/ 346 ******************************************************************************/
346static struct pxa2xx_udc_mach_info palmt5_udc_info __initdata = { 347static struct gpio_vbus_mach_info palmt5_udc_info = {
347 .gpio_vbus = GPIO_NR_PALMT5_USB_DETECT_N, 348 .gpio_vbus = GPIO_NR_PALMT5_USB_DETECT_N,
348 .gpio_vbus_inverted = 1, 349 .gpio_vbus_inverted = 1,
349 .gpio_pullup = GPIO_NR_PALMT5_USB_PULLUP, 350 .gpio_pullup = GPIO_NR_PALMT5_USB_PULLUP,
350 .gpio_pullup_inverted = 0, 351};
352
353static struct platform_device palmt5_gpio_vbus = {
354 .name = "gpio-vbus",
355 .id = -1,
356 .dev = {
357 .platform_data = &palmt5_udc_info,
358 },
351}; 359};
352 360
353/****************************************************************************** 361/******************************************************************************
@@ -466,30 +474,18 @@ static struct pxafb_mach_info palmt5_lcd_screen = {
466/****************************************************************************** 474/******************************************************************************
467 * Power management - standby 475 * Power management - standby
468 ******************************************************************************/ 476 ******************************************************************************/
469#ifdef CONFIG_PM 477static void __init palmt5_pm_init(void)
470static u32 *addr __initdata;
471static u32 resume[3] __initdata = {
472 0xe3a00101, /* mov r0, #0x40000000 */
473 0xe380060f, /* orr r0, r0, #0x00f00000 */
474 0xe590f008, /* ldr pc, [r0, #0x08] */
475};
476
477static int __init palmt5_pm_init(void)
478{ 478{
479 int i; 479 static u32 resume[] = {
480 480 0xe3a00101, /* mov r0, #0x40000000 */
481 /* this is where the bootloader jumps */ 481 0xe380060f, /* orr r0, r0, #0x00f00000 */
482 addr = phys_to_virt(PALMT5_STR_BASE); 482 0xe590f008, /* ldr pc, [r0, #0x08] */
483 483 };
484 for (i = 0; i < 3; i++) 484
485 addr[i] = resume[i]; 485 /* copy the bootloader */
486 486 memcpy(phys_to_virt(PALMT5_STR_BASE), resume, sizeof(resume));
487 return 0;
488} 487}
489 488
490device_initcall(palmt5_pm_init);
491#endif
492
493/****************************************************************************** 489/******************************************************************************
494 * Machine init 490 * Machine init
495 ******************************************************************************/ 491 ******************************************************************************/
@@ -500,6 +496,7 @@ static struct platform_device *devices[] __initdata = {
500 &palmt5_backlight, 496 &palmt5_backlight,
501 &power_supply, 497 &power_supply,
502 &palmt5_asoc, 498 &palmt5_asoc,
499 &palmt5_gpio_vbus,
503}; 500};
504 501
505/* setup udc GPIOs initial state */ 502/* setup udc GPIOs initial state */
@@ -515,14 +512,15 @@ static void __init palmt5_init(void)
515{ 512{
516 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config)); 513 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
517 514
515 palmt5_pm_init();
518 set_pxa_fb_info(&palmt5_lcd_screen); 516 set_pxa_fb_info(&palmt5_lcd_screen);
519 pxa_set_mci_info(&palmt5_mci_platform_data); 517 pxa_set_mci_info(&palmt5_mci_platform_data);
520 palmt5_udc_init(); 518 palmt5_udc_init();
521 pxa_set_ac97_info(&palmt5_ac97_pdata); 519 pxa_set_ac97_info(&palmt5_ac97_pdata);
522 pxa_set_udc_info(&palmt5_udc_info);
523 pxa_set_ficp_info(&palmt5_ficp_platform_data); 520 pxa_set_ficp_info(&palmt5_ficp_platform_data);
524 pxa_set_keypad_info(&palmt5_keypad_platform_data); 521 pxa_set_keypad_info(&palmt5_keypad_platform_data);
525 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 522 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
523
526 platform_add_devices(devices, ARRAY_SIZE(devices)); 524 platform_add_devices(devices, ARRAY_SIZE(devices));
527} 525}
528 526