Skip to contentSkip to conversation

scratchpad contents

PATCH New Rajendra Nayak 1 participant 1 message Jul 18, 2008

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

PATCH 5/11 scratchpad contents

This patch populates the scratchpad

---
 arch/arm/mach-omap2/pm.h        |    7 +
 arch/arm/mach-omap2/pm34xx.c    |  170 +++++++++++++++++++++++++++++++++++++++-
 arch/arm/mach-omap2/sleep34xx.S |    8 -
 include/asm-arm/arch-omap/pm.h  |    4 
 4 files changed, 182 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/pm.h +7 -0
Index: linux-omap-2.6/arch/arm/mach-omap2/pm.h
===================================================================
@@ -20,6 +20,13 @@ extern unsigned short enable_dyn_sleep;
 extern unsigned short clocks_off_while_idle;
 extern atomic_t sleep_block;
 
+#define SCRATCHPAD_ROM  		0x48002860
+#define SCRATCHPAD      		0x48002910
+#define SCRATHPAD_ROM_OFFSET    	0x19C
+#define TABLE_ADDRESS_OFFSET    	0x31
+#define TABLE_VALUE_OFFSET      	0x30
+#define CONTROL_REG_VALUE_OFFSET	0x32
+
 #ifdef CONFIG_PM_DEBUG
 extern void omap2_pm_dump(int mode, int resume, unsigned int us);
 extern int omap2_pm_debug;
arch/arm/mach-omap2/pm34xx.c +168 -2

217 lines not on this page · raw message

arch/arm/mach-omap2/sleep34xx.S +3 -5
Index: linux-omap-2.6/arch/arm/mach-omap2/sleep34xx.S
===================================================================
@@ -37,12 +37,10 @@
 				OMAP3430_PM_PREPWSTST)
 #define PM_PREPWSTST_MPU_V	OMAP34XX_PRM_REGADDR(MPU_MOD, \
 				OMAP3430_PM_PREPWSTST)
-#define PM_PWSTCTRL_MPU_P	OMAP34XX_PRM_REGADDR(MPU_MOD, PM_PWSTCTRL)
+#define PM_PWSTCTRL_MPU_P	0x483069E0
 #define SCRATCHPAD_MEM_OFFS	0x310 /* Move this as correct place is
 				       * available */
-#define SCRATCHPAD_BASE_P	OMAP343X_CTRL_REGADDR(\
-				OMAP343X_CONTROL_MEM_WKUP +\
-				SCRATCHPAD_MEM_OFFS)
+#define SCRATCHPAD_BASE_P	0x48002910
 #define SDRC_POWER_V		OMAP34XX_SDRC_REGADDR(SDRC_POWER)
 
 	.text
@@ -97,7 +95,7 @@ loop:
 
 	ldmfd	sp!, {r0-r12, pc}		@ restore regs and return
 restore:
-	/* b restore*/ 	@ Enable to debug restore code
+	/* b restore*/  @ Enable to debug restore code
         /* Check what was the reason for mpu reset and store the reason in r9*/
         /* 1 - Only L1 and logic lost */
         /* 2 - Only L2 lost - In this case, we wont be here */
include/asm-arm/arch-omap/pm.h +4 -0
Index: linux-omap-2.6/include/asm-arm/arch-omap/pm.h
===================================================================
@@ -153,6 +153,10 @@ extern void omap1510_idle_loop_suspend(v
 extern void omap1610_idle_loop_suspend(void);
 extern void omap242x_idle_loop_suspend(void);
 extern void omap243x_idle_loop_suspend(void);
+extern void save_scratchpad_contents(void);
+extern void clear_scratchpad_contents(void);
+extern u32 *get_restore_pointer(void);
+extern void vfp_enable(void);
 
 extern unsigned int omap730_cpu_suspend_sz;
 extern unsigned int omap1510_cpu_suspend_sz;