Skip to contentSkip to conversation

Fix HW SAVEANDRESTORE shift define

PATCH New Kalle Jokiniemi 4 participants 5 messages Apr 1, 2009 – May 14, 2009

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

cover Fix HW SAVEANDRESTORE shift define

Here's a patch that fixes a bug in enabling and disabling hardware save-and-restore functionality in powerdomain.c code.

This affects power management, as it also fixes a hw bug in off-mode, but I think this should be applied directly to linux-omap. As this part of code is already there and its setting up wrong bits in PM_PWSTCTRL registers.

Kalle Jokiniemi (1):
ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

#1 lore raw

PATCH 1/1 ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

The OMAP3430ES2_SAVEANDRESTORE_SHIFT macro is used by powerdomain code in
"1 << OMAP3430ES2_SAVEANDRESTORE_SHIFT" manner, but the definition was also (1 << 4), meaning we actually modified bit 16. So the definition needs to be 4.

This fixes also a cold reset HW bug in OMAP3430 ES3.x where some of the efuse bits are not isolated during wake-up from off mode. This can cause randomish cold resets with off mode. Enabling the USBTLL hardware SAVEANDRESTORE causes the core power up assert to be delayed in a way that we will not get faulty values when boot ROM is reading the unisolated registers.

---
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/prm-regbits-34xx.h +1 -1
index d73eee8..d792c29 100644
@@ -409,7 +409,7 @@
 /* PM_PREPWSTST_CAM specific bits */
 
 /* PM_PWSTCTRL_USBHOST specific bits */
-#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		(1 << 4)
+#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		4
 
 /* RM_RSTST_PER specific bits */
 
Signature · 1 line
1.5.4.3
Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

Quoted 14 lines · Kalle Jokiniemi

The OMAP3430ES2_SAVEANDRESTORE_SHIFT macro is used by powerdomain code in
"1 << OMAP3430ES2_SAVEANDRESTORE_SHIFT" manner, but the definition was also (1 << 4), meaning we actually modified bit 16. So the definition needs to be 4.

This fixes also a cold reset HW bug in OMAP3430 ES3.x where some of the efuse bits are not isolated during wake-up from off mode. This can cause randomish cold resets with off mode. Enabling the USBTLL hardware SAVEANDRESTORE causes the core power up assert to be delayed in a way that we will not get faulty values when boot ROM is reading the unisolated registers.

Quoted 1 line
Quoted 19 lines
---
 arch/arm/mach-omap2/prm-regbits-34xx.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/prm-regbits-34xx.h +1 -1
index d73eee8..d792c29 100644
@@ -409,7 +409,7 @@
 /* PM_PREPWSTST_CAM specific bits */
 
 /* PM_PWSTCTRL_USBHOST specific bits */
-#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		(1 << 4)
+#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		4
 
 /* RM_RSTST_PER specific bits */
 
Signature · 1 line
1.5.4.3
maintainer Acked-by on v1 1/1
#3 lore raw

Re: [PATCH] ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

In reply to Kalle Jokiniemi
Quoted 5 lines · Kalle Jokiniemi

The OMAP3430ES2_SAVEANDRESTORE_SHIFT macro is used by powerdomain code in
"1 << OMAP3430ES2_SAVEANDRESTORE_SHIFT" manner, but the definition was also (1 << 4), meaning we actually modified bit 16. So the definition needs to be 4.

Thanks Kalle,

Quoted 21 lines
arch/arm/mach-omap2/prm-regbits-34xx.h +1 -1
index d73eee8..d792c29 100644
@@ -409,7 +409,7 @@
 /* PM_PREPWSTST_CAM specific bits */
 
 /* PM_PWSTCTRL_USBHOST specific bits */
-#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		(1 << 4)
+#define OMAP3430ES2_SAVEANDRESTORE_SHIFT		4
 
 /* RM_RSTST_PER specific bits */
 
Signature · 6 lines
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

- Paul

maintainer
#4 lore raw

PATCH 1/1 ARM: OMAP3: Fix HW SAVEANDRESTORE shift define

In reply to Kalle Jokiniemi

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Initial commit ID (Likely to change): e2196a74ba4faeb272caef961b22e9ab982fb442

PatchWorks
http://patchwork.kernel.org/patch/15586/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=e2196a74ba4faeb272caef961b22e9ab982fb442