aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-05-14 05:27:00 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-06-04 22:43:29 -0400
commitfc9c1b6fc874d786f32163291b059ec574698aa2 (patch)
treede8c97f99e4218684512050305be22e503f3fc07 /arch/arm
parent37330efd4abb474b3fdfacea68beb37cf67564ed (diff)
[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')
-rw-r--r--arch/arm/mach-pxa/palmld.c31
-rw-r--r--arch/arm/mach-pxa/palmt5.c32
-rw-r--r--arch/arm/mach-pxa/palmtx.c31
3 files changed, 31 insertions, 63 deletions
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 471a853e548b..1f1917fc2008 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -524,30 +524,18 @@ static struct pxafb_mach_info palmld_lcd_screen = {
524/****************************************************************************** 524/******************************************************************************
525 * Power management - standby 525 * Power management - standby
526 ******************************************************************************/ 526 ******************************************************************************/
527#ifdef CONFIG_PM 527static void __init palmld_pm_init(void)
528static u32 *addr __initdata;
529static u32 resume[3] __initdata = {
530 0xe3a00101, /* mov r0, #0x40000000 */
531 0xe380060f, /* orr r0, r0, #0x00f00000 */
532 0xe590f008, /* ldr pc, [r0, #0x08] */
533};
534
535static int __init palmld_pm_init(void)
536{ 528{
537 int i; 529 static u32 resume[] = {
538 530 0xe3a00101, /* mov r0, #0x40000000 */
539 /* this is where the bootloader jumps */ 531 0xe380060f, /* orr r0, r0, #0x00f00000 */
540 addr = phys_to_virt(PALMLD_STR_BASE); 532 0xe590f008, /* ldr pc, [r0, #0x08] */
541 533 };
542 for (i = 0; i < 3; i++) 534
543 addr[i] = resume[i]; 535 /* copy the bootloader */
544 536 memcpy(phys_to_virt(PALMLD_STR_BASE), resume, sizeof(resume));
545 return 0;
546} 537}
547 538
548device_initcall(palmld_pm_init);
549#endif
550
551/****************************************************************************** 539/******************************************************************************
552 * Machine init 540 * Machine init
553 ******************************************************************************/ 541 ******************************************************************************/
@@ -586,6 +574,7 @@ static void __init palmld_init(void)
586{ 574{
587 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config)); 575 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
588 576
577 palmld_pm_init();
589 set_pxa_fb_info(&palmld_lcd_screen); 578 set_pxa_fb_info(&palmld_lcd_screen);
590 pxa_set_mci_info(&palmld_mci_platform_data); 579 pxa_set_mci_info(&palmld_mci_platform_data);
591 pxa_set_ac97_info(&palmld_ac97_pdata); 580 pxa_set_ac97_info(&palmld_ac97_pdata);
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 76a6ea2893da..aae64a12a734 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -474,30 +474,18 @@ static struct pxafb_mach_info palmt5_lcd_screen = {
474/****************************************************************************** 474/******************************************************************************
475 * Power management - standby 475 * Power management - standby
476 ******************************************************************************/ 476 ******************************************************************************/
477#ifdef CONFIG_PM 477static void __init palmt5_pm_init(void)
478static u32 *addr __initdata;
479static u32 resume[3] __initdata = {
480 0xe3a00101, /* mov r0, #0x40000000 */
481 0xe380060f, /* orr r0, r0, #0x00f00000 */
482 0xe590f008, /* ldr pc, [r0, #0x08] */
483};
484
485static int __init palmt5_pm_init(void)
486{ 478{
487 int i; 479 static u32 resume[] = {
488 480 0xe3a00101, /* mov r0, #0x40000000 */
489 /* this is where the bootloader jumps */ 481 0xe380060f, /* orr r0, r0, #0x00f00000 */
490 addr = phys_to_virt(PALMT5_STR_BASE); 482 0xe590f008, /* ldr pc, [r0, #0x08] */
491 483 };
492 for (i = 0; i < 3; i++) 484
493 addr[i] = resume[i]; 485 /* copy the bootloader */
494 486 memcpy(phys_to_virt(PALMT5_STR_BASE), resume, sizeof(resume));
495 return 0;
496} 487}
497 488
498device_initcall(palmt5_pm_init);
499#endif
500
501/****************************************************************************** 489/******************************************************************************
502 * Machine init 490 * Machine init
503 ******************************************************************************/ 491 ******************************************************************************/
@@ -524,6 +512,7 @@ static void __init palmt5_init(void)
524{ 512{
525 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config)); 513 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
526 514
515 palmt5_pm_init();
527 set_pxa_fb_info(&palmt5_lcd_screen); 516 set_pxa_fb_info(&palmt5_lcd_screen);
528 pxa_set_mci_info(&palmt5_mci_platform_data); 517 pxa_set_mci_info(&palmt5_mci_platform_data);
529 palmt5_udc_init(); 518 palmt5_udc_init();
@@ -531,6 +520,7 @@ static void __init palmt5_init(void)
531 pxa_set_ficp_info(&palmt5_ficp_platform_data); 520 pxa_set_ficp_info(&palmt5_ficp_platform_data);
532 pxa_set_keypad_info(&palmt5_keypad_platform_data); 521 pxa_set_keypad_info(&palmt5_keypad_platform_data);
533 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 522 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
523
534 platform_add_devices(devices, ARRAY_SIZE(devices)); 524 platform_add_devices(devices, ARRAY_SIZE(devices));
535} 525}
536 526
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 3ed5ae0371cb..6c15d84bde53 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 = {
491/****************************************************************************** 491/******************************************************************************
492 * Power management - standby 492 * Power management - standby
493 ******************************************************************************/ 493 ******************************************************************************/
494#ifdef CONFIG_PM 494static void __init palmtx_pm_init(void)
495static u32 *addr __initdata;
496static u32 resume[3] __initdata = {
497 0xe3a00101, /* mov r0, #0x40000000 */
498 0xe380060f, /* orr r0, r0, #0x00f00000 */
499 0xe590f008, /* ldr pc, [r0, #0x08] */
500};
501
502static int __init palmtx_pm_init(void)
503{ 495{
504 int i; 496 static u32 resume[] = {
505 497 0xe3a00101, /* mov r0, #0x40000000 */
506 /* this is where the bootloader jumps */ 498 0xe380060f, /* orr r0, r0, #0x00f00000 */
507 addr = phys_to_virt(PALMTX_STR_BASE); 499 0xe590f008, /* ldr pc, [r0, #0x08] */
508 500 };
509 for (i = 0; i < 3; i++) 501
510 addr[i] = resume[i]; 502 /* copy the bootloader */
511 503 memcpy(phys_to_virt(PALMTX_STR_BASE), resume, sizeof(resume));
512 return 0;
513} 504}
514 505
515device_initcall(palmtx_pm_init);
516#endif
517
518/****************************************************************************** 506/******************************************************************************
519 * Machine init 507 * Machine init
520 ******************************************************************************/ 508 ******************************************************************************/
@@ -557,6 +545,7 @@ static void __init palmtx_init(void)
557{ 545{
558 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); 546 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
559 547
548 palmtx_pm_init();
560 set_pxa_fb_info(&palmtx_lcd_screen); 549 set_pxa_fb_info(&palmtx_lcd_screen);
561 pxa_set_mci_info(&palmtx_mci_platform_data); 550 pxa_set_mci_info(&palmtx_mci_platform_data);
562 palmtx_udc_init(); 551 palmtx_udc_init();