Skip to contentSkip to conversation

OMAP3: PM: Fix the pwrdm_enable/disable_hdwr_sar funcs

PATCH In review Rajendra Nayak 4 participants 5 messages Jun 5, 2009 – Jun 8, 2009

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

PATCH 1/1 OMAP3: PM: Fix the pwrdm_enable/disable_hdwr_sar funcs

The pwrdm_enable_hdwr_sar/pwrdm_disable_hdwr_sar do not actually set/reset the SAVEANDRESTORE bit in the PWSTCTRL register but modify some other bit instead.
This happens due to the OMAP3430ES2_SAVEANDRESTORE_SHIFT being defined as (1 << 4) instead of just 4.

---
 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 06fee29..d4ea370 100644
@@ -411,7 +411,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.7
#1 lore raw
Quoted 7 lines · Rajendra Nayak

The pwrdm_enable_hdwr_sar/pwrdm_disable_hdwr_sar do not actually set/reset the SAVEANDRESTORE bit in the PWSTCTRL register but modify some other bit instead.
This happens due to the OMAP3430ES2_SAVEANDRESTORE_SHIFT being defined as (1 << 4) instead of just 4.

Thanks, pushing to PM branch.

I'll wait to hear from Kalle if we can revert his previous patch for this.

Kevin

Quoted 24 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 06fee29..d4ea370 100644
@@ -411,7 +411,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.7

--
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
maintainer
#2 lore raw
Quoted 8 lines · Kevin Hilman
Quoted 6 lines · Rajendra Nayak

The pwrdm_enable_hdwr_sar/pwrdm_disable_hdwr_sar do not actually set/reset the SAVEANDRESTORE bit in the PWSTCTRL register but modify some other bit instead.
This happens due to the OMAP3430ES2_SAVEANDRESTORE_SHIFT being defined as (1 << 4) instead of just 4.

Quoted 6 lines
Quoted 1 line

Thanks, pushing to PM branch.

I'll wait to hear from Kalle if we can revert his previous patch for this.

I think Kalle covered this one already:

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

- Paul

Quoted 32 lines

Kevin

Quoted 24 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 06fee29..d4ea370 100644
@@ -411,7 +411,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.7

--
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

--
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

#3 lore raw
Quoted 12 lines · Paul Walmsley
Quoted 10 lines · Kevin Hilman
Quoted 7 lines · Rajendra Nayak

The pwrdm_enable_hdwr_sar/pwrdm_disable_hdwr_sar do not actually set/reset the SAVEANDRESTORE bit in the PWSTCTRL register but modify some other bit instead.
This happens due to the OMAP3430ES2_SAVEANDRESTORE_SHIFT being defined as (1 << 4) instead of just 4.

Quoted 8 lines
Quoted 4 lines

Thanks, pushing to PM branch.

I'll wait to hear from Kalle if we can revert his previous patch for this.

I think Kalle covered this one already:

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

... but was missing from PM branch. Remedied now.

But we also have a patch in the PM branch[1] which disables the USBHOST SAR by removing the HAS_HDWR_SAR flag for the pwrdm.

I'm gessing/hoping that fixing this shift value allows us to revert that patch and am hoping for some confirmation from Kalle.

Kevin

[1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commit;h=942fc93ce6b5ec7999f7864f6bb088cc8f308f45

#4 lore raw

________________________________________
Lähettäjä: Kevin Hilman [[email protected]] Lähetetty: 6. kesäkuuta 2009 1:53
Vastaanottaja: Paul Walmsley
Kopio: Rajendra Nayak; Jokiniemi Kalle; [email protected]
Aihe: Re: [PATCH] OMAP3: PM: Fix the pwrdm_enable/disable_hdwr_sar funcs

Quoted 21 lines · Paul Walmsley
Quoted 12 lines · Kevin Hilman
Quoted 11 lines
Quoted 7 lines · Rajendra Nayak

The pwrdm_enable_hdwr_sar/pwrdm_disable_hdwr_sar do not actually set/reset the SAVEANDRESTORE bit in the PWSTCTRL register but modify some other bit instead.
This happens due to the OMAP3430ES2_SAVEANDRESTORE_SHIFT being defined as (1 << 4) instead of just 4.

Quoted 8 lines
Quoted 4 lines

Thanks, pushing to PM branch.

I'll wait to hear from Kalle if we can revert his previous patch for this.

I think Kalle covered this one already:

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

Quoted 8 lines

... but was missing from PM branch. Remedied now.

But we also have a patch in the PM branch[1] which disables the USBHOST SAR by removing the HAS_HDWR_SAR flag for the pwrdm.

I'm gessing/hoping that fixing this shift value allows us to revert that patch and am hoping for some confirmation from Kalle.

The above shift fix enabled both USBHOST and USBTLL saverestores. Unfortunately, the USBHOST saverestore seems to cause the USBHOST power domain to hang in active state after toggling /sys/power/enable_off_mode 0 -> 1-> 0. This was observed at least on RX-51. Haven't tested this on other hardware though. USBTLL saverestore works ok on ES3.1 and later devices.

I think the conclusion from discussion with Richard W. was that using SW triggered power domain state transition for USBHOST would make the USBHOST SAR work. The problem with just disabling USBHOST SAR is that it leaves ES3.0 devices open for the dreaded "cold reset issue" (as USBTLL SAR won't work on ES3.0).

We are currently using all ES3.1 devices, so there is no push to get a better fix for this. If anyone wants to take a shot at the problem, feel free to do so.

- Kalle

Quoted 5 lines

Kevin

[1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=commit;h=942fc93ce6b5ec7999f7864f6bb088cc8f308f45
--

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