Skip to contentSkip to conversation

OMAP3: SRAM restore function

PATCH In review Rajendra Nayak 1 participant 1 message Sep 26, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 10/16 OMAP3: SRAM restore function

This patch updates the context restore function for sram

---
 arch/arm/mach-omap2/pm34xx.c           |   10 +++++++---
 arch/arm/plat-omap/include/mach/sram.h |    1 +
 arch/arm/plat-omap/sram.c              |    6 +++---
 3 files changed, 11 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/pm34xx.c +7 -3
Index: linux-omap-2.6/arch/arm/mach-omap2/pm34xx.c
===================================================================
@@ -558,6 +558,12 @@ static int __init clkdms_setup(struct cl
 	return 0;
 }
 
+void omap_push_sram_idle()
+{
+	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
+					omap34xx_cpu_suspend_sz);
+}
+
 int __init omap3_pm_init(void)
 {
 	struct power_state *pwrst;
@@ -592,9 +598,7 @@ int __init omap3_pm_init(void)
 		goto err2;
 	}
 
-	_omap_sram_idle = omap_sram_push(omap34xx_cpu_suspend,
-					omap34xx_cpu_suspend_sz);
-
+	omap_push_sram_idle();
 	suspend_set_ops(&omap_pm_ops);
 
 	pm_idle = omap3_pm_idle;
arch/arm/plat-omap/sram.c +3 -3
Index: linux-omap-2.6/arch/arm/plat-omap/sram.c
===================================================================
@@ -367,14 +367,14 @@ u32 omap3_configure_core_dpll(u32 sdrc_r
 					       sdrc_actim_ctrlb, m2);
  }
 
-/* REVISIT: Should this be same as omap34xx_sram_init() after off-idle? */
-void restore_sram_functions(void)
+void omap3_sram_restore_context(void)
 {
 	omap_sram_ceil = omap_sram_base + omap_sram_size;
 
 	_omap3_sram_configure_core_dpll =
 		omap_sram_push(omap3_sram_configure_core_dpll,
 			       omap3_sram_configure_core_dpll_sz);
+	omap_push_sram_idle();
 }
 
 int __init omap3_sram_init(void)
@@ -382,7 +382,7 @@ int __init omap3_sram_init(void)
 	_omap3_sram_configure_core_dpll =
 		omap_sram_push(omap3_sram_configure_core_dpll,
 			       omap3_sram_configure_core_dpll_sz);
-
+	omap_push_sram_idle();
 	return 0;
 }
 #else
arch/arm/plat-omap/include/mach/sram.h +1 -0
Index: linux-omap-2.6/arch/arm/plat-omap/include/mach/sram.h
===================================================================
@@ -62,5 +62,6 @@ extern u32 omap3_sram_configure_core_dpl
 					  u32 sdrc_actim_ctrla,
 					  u32 sdrc_actim_ctrlb, u32 m2);
 extern unsigned long omap3_sram_configure_core_dpll_sz;
+extern void omap_push_sram_idle();
 
 #endif