Skip to contentSkip to conversation

OMAP3: PM: fix scratchpad memory accesses for off-mode

PATCH In review Kevin Hilman 2 participants 2 messages Oct 8, 2010 – Oct 11, 2010

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

PATCH 1/1 OMAP3: PM: fix scratchpad memory accesses for off-mode

Commit 914bab936fe0388a529079679e2f137aa4ff548d (OMAP: mach-omap2: Fix incorrect assignment warnings) changed a pointer from 'u32 *' to 'void *' without also fixing up the pointer arithmetic.

Fix the scratchpad offsets so they are byte offsets instead of word offsets and thus work correctly with a void pointer base.

Special thanks to Jean Pihet for taking the time track down this problem and propose an initial solution.

Tested with off-idle and off-suspend on 36xx/Zoom3 and 34xx/omap3evm.

---
Tony, we need this queued for 2.6.37 as this is a regression fix.

 arch/arm/mach-omap2/pm34xx.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/pm34xx.c +3 -3
index 8c8f1ac..75c0cd1 100644
@@ -50,9 +50,9 @@
 #include "control.h"
 
 /* Scratchpad offsets */
-#define OMAP343X_TABLE_ADDRESS_OFFSET	   0x31
-#define OMAP343X_TABLE_VALUE_OFFSET	   0x30
-#define OMAP343X_CONTROL_REG_VALUE_OFFSET  0x32
+#define OMAP343X_TABLE_ADDRESS_OFFSET	   0xc4
+#define OMAP343X_TABLE_VALUE_OFFSET	   0xc0
+#define OMAP343X_CONTROL_REG_VALUE_OFFSET  0xc8
 
 struct power_state {
 	struct powerdomain *pwrdm;
Signature · 1 line
1.7.2.1
maintainer
#1 lore raw
Quoted 10 lines · Kevin Hilman

Commit 914bab936fe0388a529079679e2f137aa4ff548d (OMAP: mach-omap2: Fix incorrect assignment warnings) changed a pointer from 'u32 *' to 'void *' without also fixing up the pointer arithmetic.

Fix the scratchpad offsets so they are byte offsets instead of word offsets and thus work correctly with a void pointer base.

Special thanks to Jean Pihet for taking the time track down this problem and propose an initial solution.

Quoted 7 lines

Tested with off-idle and off-suspend on 36xx/Zoom3 and 34xx/omap3evm.

---
Tony, we need this queued for 2.6.37 as this is a regression fix.

Thanks, adding to omap-for-linus.

Tony