Skip to contentSkip to conversation

OMAP3: PM: Invoke omap3_save_scratchpad_contents() only once at boot time

PATCH In review Kim Kyuwon 2 participants 2 messages Mar 20, 2009 – Apr 1, 2009

Subsystems (4)
lore
Share & tools
lore

Kim Kyuwon

author
#0 lore raw

PATCH 2/2 OMAP3: PM: Invoke omap3_save_scratchpad_contents() only once at boot time

If CONFIG_CPU_IDLE is y, omap3_save_scratchpad_contents() is called twice at boot time. This patch let it be invoked only once.

---
 arch/arm/mach-omap2/cpuidle34xx.c |    2 --
 arch/arm/mach-omap2/pm34xx.c      |    5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/cpuidle34xx.c
index a5eba31..056fb5f 100644

arch/arm/mach-omap2/cpuidle34xx.c +0 -2
@@ -271,8 +271,6 @@ int omap3_idle_init(void)
 	struct cpuidle_state *state;
 	struct cpuidle_device *dev;
 
-	omap3_save_scratchpad_contents();
-
 	mpu_pd = pwrdm_lookup("mpu_pwrdm");
 	core_pd = pwrdm_lookup("core_pwrdm");
 	per_pd = pwrdm_lookup("per_pwrdm");
arch/arm/mach-omap2/pm34xx.c +2 -3
index ff9f28d..001baa9 100644
@@ -967,6 +967,8 @@ int __init omap3_pm_init(void)
 #endif /* CONFIG_SUSPEND */
 
 	pm_idle = omap3_pm_idle;
+
+	omap3_save_scratchpad_contents();
 	omap3_idle_init();
 
 	pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm);
@@ -984,10 +986,7 @@ int __init omap3_pm_init(void)
 		if (!omap3_secure_ram_storage)
 			printk(KERN_ERR "Memory allocation failed when"
 					"allocating for secure sram context\n");
-	}
-	omap3_save_scratchpad_contents();
 
-	if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
 		local_irq_disable();
 		local_fiq_disable();
 
Signature · 5 lines
1.5.2.5


-- 
Kim Kyuwon
#1 lore raw
Quoted 4 lines · Kim Kyuwon

If CONFIG_CPU_IDLE is y, omap3_save_scratchpad_contents() is called twice at boot time. This patch let it be invoked only once.

Thanks, pushing to PM branch.

Kevin

Quoted 49 lines
---
 arch/arm/mach-omap2/cpuidle34xx.c |    2 --
 arch/arm/mach-omap2/pm34xx.c      |    5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/cpuidle34xx.c +0 -2
index a5eba31..056fb5f 100644
@@ -271,8 +271,6 @@ int omap3_idle_init(void)
 	struct cpuidle_state *state;
 	struct cpuidle_device *dev;
 
-	omap3_save_scratchpad_contents();
-
 	mpu_pd = pwrdm_lookup("mpu_pwrdm");
 	core_pd = pwrdm_lookup("core_pwrdm");
 	per_pd = pwrdm_lookup("per_pwrdm");
arch/arm/mach-omap2/pm34xx.c +2 -3
index ff9f28d..001baa9 100644
@@ -967,6 +967,8 @@ int __init omap3_pm_init(void)
 #endif /* CONFIG_SUSPEND */
 
 	pm_idle = omap3_pm_idle;
+
+	omap3_save_scratchpad_contents();
 	omap3_idle_init();
 
 	pwrdm_add_wkdep(neon_pwrdm, mpu_pwrdm);
@@ -984,10 +986,7 @@ int __init omap3_pm_init(void)
 		if (!omap3_secure_ram_storage)
 			printk(KERN_ERR "Memory allocation failed when"
 					"allocating for secure sram context\n");
-	}
-	omap3_save_scratchpad_contents();
 
-	if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
 		local_irq_disable();
 		local_fiq_disable();
 
Signature · 5 lines
1.5.2.5


-- 
Kim Kyuwon