aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/palmtx.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-06-14 06:00:16 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-06-14 06:00:16 -0400
commit4c31791c3d9d38ac052dd5e2981df713d8f3dcc4 (patch)
treeb7f95922b2f1da5b36d95176e6d8f826151f3ee1 /arch/arm/mach-pxa/palmtx.c
parent98797a241e28b787b84d308b867ec4c5fe7bbdf8 (diff)
parent7517b3fbe40c231d79d36f31c1e9930cbb8c4be2 (diff)
Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-rw-r--r--arch/arm/mach-pxa/palmtx.c45
1 files changed, 21 insertions, 24 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index e99a893c58a7..6c15d84bde53 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -27,6 +27,7 @@
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/wm97xx_batt.h> 28#include <linux/wm97xx_batt.h>
29#include <linux/power_supply.h> 29#include <linux/power_supply.h>
30#include <linux/usb/gpio_vbus.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -359,11 +360,18 @@ static struct pxaficp_platform_data palmtx_ficp_platform_data = {
359/****************************************************************************** 360/******************************************************************************
360 * UDC 361 * UDC
361 ******************************************************************************/ 362 ******************************************************************************/
362static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = { 363static struct gpio_vbus_mach_info palmtx_udc_info = {
363 .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N, 364 .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N,
364 .gpio_vbus_inverted = 1, 365 .gpio_vbus_inverted = 1,
365 .gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP, 366 .gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP,
366 .gpio_pullup_inverted = 0, 367};
368
369static struct platform_device palmtx_gpio_vbus = {
370 .name = "gpio-vbus",
371 .id = -1,
372 .dev = {
373 .platform_data = &palmtx_udc_info,
374 },
367}; 375};
368 376
369/****************************************************************************** 377/******************************************************************************
@@ -483,30 +491,18 @@ static struct pxafb_mach_info palmtx_lcd_screen = {
483/****************************************************************************** 491/******************************************************************************
484 * Power management - standby 492 * Power management - standby
485 ******************************************************************************/ 493 ******************************************************************************/
486#ifdef CONFIG_PM 494static void __init palmtx_pm_init(void)
487static u32 *addr __initdata;
488static u32 resume[3] __initdata = {
489 0xe3a00101, /* mov r0, #0x40000000 */
490 0xe380060f, /* orr r0, r0, #0x00f00000 */
491 0xe590f008, /* ldr pc, [r0, #0x08] */
492};
493
494static int __init palmtx_pm_init(void)
495{ 495{
496 int i; 496 static u32 resume[] = {
497 497 0xe3a00101, /* mov r0, #0x40000000 */
498 /* this is where the bootloader jumps */ 498 0xe380060f, /* orr r0, r0, #0x00f00000 */
499 addr = phys_to_virt(PALMTX_STR_BASE); 499 0xe590f008, /* ldr pc, [r0, #0x08] */
500 500 };
501 for (i = 0; i < 3; i++) 501
502 addr[i] = resume[i]; 502 /* copy the bootloader */
503 503 memcpy(phys_to_virt(PALMTX_STR_BASE), resume, sizeof(resume));
504 return 0;
505} 504}
506 505
507device_initcall(palmtx_pm_init);
508#endif
509
510/****************************************************************************** 506/******************************************************************************
511 * Machine init 507 * Machine init
512 ******************************************************************************/ 508 ******************************************************************************/
@@ -517,6 +513,7 @@ static struct platform_device *devices[] __initdata = {
517 &palmtx_backlight, 513 &palmtx_backlight,
518 &power_supply, 514 &power_supply,
519 &palmtx_asoc, 515 &palmtx_asoc,
516 &palmtx_gpio_vbus,
520}; 517};
521 518
522static struct map_desc palmtx_io_desc[] __initdata = { 519static struct map_desc palmtx_io_desc[] __initdata = {
@@ -548,11 +545,11 @@ static void __init palmtx_init(void)
548{ 545{
549 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); 546 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
550 547
548 palmtx_pm_init();
551 set_pxa_fb_info(&palmtx_lcd_screen); 549 set_pxa_fb_info(&palmtx_lcd_screen);
552 pxa_set_mci_info(&palmtx_mci_platform_data); 550 pxa_set_mci_info(&palmtx_mci_platform_data);
553 palmtx_udc_init(); 551 palmtx_udc_init();
554 pxa_set_ac97_info(&palmtx_ac97_pdata); 552 pxa_set_ac97_info(&palmtx_ac97_pdata);
555 pxa_set_udc_info(&palmtx_udc_info);
556 pxa_set_ficp_info(&palmtx_ficp_platform_data); 553 pxa_set_ficp_info(&palmtx_ficp_platform_data);
557 pxa_set_keypad_info(&palmtx_keypad_platform_data); 554 pxa_set_keypad_info(&palmtx_keypad_platform_data);
558 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 555 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);