ARM: OMAP4: powerdomain: Misc powerdomain fix and associated cleanup
cover ARM: OMAP4: powerdomain: Misc powerdomain fix and associated cleanup
Paul,
Can you please have at this series ?
First patch is the bug fix and second one is the cleanup which you proposed some time back.
Santosh Shilimkar (2):
ARM: OMAP: powerdomain: Wait for powerdomain transition in
pwrdm_state_switch()
ARM: OMAP: powerdomain: Get rid off duplicate
pwrdm_clkdm_state_switch() API
arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/clockdomain.c | 7 +++---- arch/arm/mach-omap2/powerdomain.c | 14 +++++--------- arch/arm/mach-omap2/powerdomain.h | 1 - 4 files changed, 9 insertions(+), 15 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Commit b1cbdb00d{OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup} was assuming that pwrdm_state_switch() does wait for the powerdomain transition which is not the case.
Fix this API by adding the pwrdm_wait_transition().
--- arch/arm/mach-omap2/powerdomain.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.c +7 -1
@@ -972,7 +972,13 @@ int pwrdm_wait_transition(struct powerdomain *pwrdm)int pwrdm_state_switch (struct powerdomain *pwrdm) { -return _pwrdm_state_switch (pwrdm,PWRDM_STATE_NOW ); +int ret; + + ret =pwrdm_wait_transition (pwrdm); +if (!ret) + ret =_pwrdm_state_switch (pwrdm,PWRDM_STATE_NOW ); + +return ret; }int pwrdm_clkdm_state_switch (struct clockdomain *clkdm)
Signature · 1 line
1.7.4.1
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Quoted 9 lines · Santosh Shilimkar
Commit b1cbdb00d{OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup} was assuming that
pwrdm_state_switch()does wait for the powerdomain transition which is not the case.Fix this API by adding the
pwrdm_wait_transition().Signed-off-by Santosh Shilimkar <[email protected]>CC Rajendra Nayak <[email protected]>CC Paul Walmsley <[email protected]>
Sounds like this fixes a major kernel oops bug for Tony so this should go in ASAP to v3.3-rc series.
- Paul
Tony Lindgren
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Quoted 8 lines · Paul Walmsley
Quoted 6 lines · Santosh Shilimkar
Commit b1cbdb00d{OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup} was assuming that
pwrdm_state_switch()does wait for the powerdomain transition which is not the case.Fix this API by adding the
pwrdm_wait_transition().
Quoted 8 lines
Quoted 3 lines
Signed-off-by Santosh Shilimkar <[email protected]>CC Rajendra Nayak <[email protected]>CC Paul Walmsley <[email protected]>Acked-by Paul Walmsley <[email protected]>Sounds like this fixes a major kernel oops bug for Tony so this should go in ASAP to v3.3-rc series.
Got a random oops with this one applied still, just happened to take longer this time :(
Regards,
Tony
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Quoted 13 lines · Tony Lindgren
Quoted 12 lines · Paul Walmsley
Quoted 9 lines · Santosh Shilimkar
Commit b1cbdb00d{OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup} was assuming that
pwrdm_state_switch()does wait for the powerdomain transition which is not the case.Fix this API by adding the
pwrdm_wait_transition().Signed-off-by Santosh Shilimkar <[email protected]>CC Rajendra Nayak <[email protected]>CC Paul Walmsley <[email protected]>
Quoted 7 lines
Quoted 4 lines
Acked-by Paul Walmsley <[email protected]>Sounds like this fixes a major kernel oops bug for Tony so this should go in ASAP to v3.3-rc series.
Got a random oops with this one applied still, just happened to take longer this time :(
Oh well. Will queue it for v3.4-rc1 then...
- Paul
Tony Lindgren
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Quoted 17 lines · Paul Walmsley
Quoted 15 lines · Tony Lindgren
Quoted 14 lines · Paul Walmsley
Quoted 9 lines · Santosh Shilimkar
Commit b1cbdb00d{OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup} was assuming that
pwrdm_state_switch()does wait for the powerdomain transition which is not the case.Fix this API by adding the
pwrdm_wait_transition().Signed-off-by Santosh Shilimkar <[email protected]>CC Rajendra Nayak <[email protected]>CC Paul Walmsley <[email protected]>Acked-by Paul Walmsley <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Sounds like this fixes a major kernel oops bug for Tony so this should go in ASAP to v3.3-rc series.
Got a random oops with this one applied still, just happened to take longer this time :(
Oh well. Will queue it for v3.4-rc1 then...
It seems that I need this patch plus need to undo the wrong serial muxing in commit 7496ba30 (ARM: OMAP2+: UART: Add default mux for all uarts) to make my zoom3 boot reliably.
Regards,
Tony
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Quoted 3 lines · Tony Lindgren
It seems that I need this patch plus need to undo the wrong serial muxing in commit
7496ba30(ARM: OMAP2+: UART: Add default mux for all uarts) to make my zoom3 boot reliably.
Okay. Well want to take the powerdomain patch for the v3.3-rc series then?
- Paul
Tony Lindgren
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
Quoted 8 lines · Paul Walmsley
Quoted 3 lines · Tony Lindgren
It seems that I need this patch plus need to undo the wrong serial muxing in commit
7496ba30(ARM: OMAP2+: UART: Add default mux for all uarts) to make my zoom3 boot reliably.Okay. Well want to take the powerdomain patch for the v3.3-rc series then?
Uhh now got a random issue of "BUG: bad unlock balance detected".. Random oopses seem less common now, but still not booting reliably.
Regards,
Tony
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
In reply to Santosh ShilimkarQuoted 9 lines · Santosh Shilimkar
Commit b1cbdb00d{OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup} was assuming that
pwrdm_state_switch()does wait for the powerdomain transition which is not the case.Fix this API by adding the
pwrdm_wait_transition().Signed-off-by Santosh Shilimkar <[email protected]>CC Rajendra Nayak <[email protected]>CC Paul Walmsley <[email protected]>
Thanks, queued for 3.4-rc.
- Paul
PATCH 2/2 ARM: OMAP: powerdomain: Get rid off duplicate pwrdm_clkdm_state_switch() API
In reply to Santosh ShilimkarWith patch 'ARM: OMAP: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()', the pwrdm_clkdm_state_switch() API becomes duplicate of pwrdm_state_switch().
Get rid off duplicate pwrdm_clkdm_state_switch() and update the users of it with pwrdm_state_switch()
--- arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/clockdomain.c | 7 +++---- arch/arm/mach-omap2/powerdomain.c | 10 ---------- arch/arm/mach-omap2/powerdomain.h | 1 - 4 files changed, 4 insertions(+), 16 deletions(-)
arch/arm/mach-omap2/clock.c +1 -1
@@ -439,7 +439,7 @@ void omap2_clk_disable_unused(struct clk *clk) clk->ops->disable(clk); }if (clk->clkdm !=NULL ) -pwrdm_clkdm_state_switch (clk->clkdm); +pwrdm_state_switch (clk->clkdm->pwrdm.ptr); }#endif
arch/arm/mach-omap2/clockdomain.c +3 -4
@@ -840,7 +840,7 @@ void clkdm_allow_idle(struct clockdomain *clkdm)spin_lock_irqsave (&clkdm->lock, flags); clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED; arch_clkdm->clkdm_allow_idle (clkdm); -pwrdm_clkdm_state_switch (clkdm); +pwrdm_state_switch (clkdm->pwrdm.ptr);spin_unlock_irqrestore (&clkdm->lock, flags); }
@@ -924,8 +924,7 @@ static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)spin_lock_irqsave (&clkdm->lock, flags); arch_clkdm->clkdm_clk_enable (clkdm); -pwrdm_wait_transition (clkdm->pwrdm.ptr); -pwrdm_clkdm_state_switch (clkdm); +pwrdm_state_switch (clkdm->pwrdm.ptr);spin_unlock_irqrestore (&clkdm->lock, flags);pr_debug ("clockdomain: clkdm %s: enabled\n" , clkdm->name);
@@ -950,7 +949,7 @@ static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)spin_lock_irqsave (&clkdm->lock, flags); arch_clkdm->clkdm_clk_disable (clkdm); -pwrdm_clkdm_state_switch (clkdm); +pwrdm_state_switch (clkdm->pwrdm.ptr);spin_unlock_irqrestore (&clkdm->lock, flags);pr_debug ("clockdomain: clkdm %s: disabled\n" , clkdm->name);
arch/arm/mach-omap2/powerdomain.c +0 -10
@@ -981,16 +981,6 @@ int pwrdm_state_switch(struct powerdomain *pwrdm)return ret; } -int pwrdm_clkdm_state_switch (struct clockdomain *clkdm) -{ -if (clkdm !=NULL && clkdm->pwrdm.ptr !=NULL ) { -pwrdm_wait_transition (clkdm->pwrdm.ptr); -return pwrdm_state_switch (clkdm->pwrdm.ptr); - } - -return -EINVAL ; -} -int pwrdm_pre_transition (void ) {pwrdm_for_each (_pwrdm_pre_transition_cb,NULL );
arch/arm/mach-omap2/powerdomain.h +0 -1
@@ -213,7 +213,6 @@ bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm);int pwrdm_wait_transition (struct powerdomain *pwrdm);int pwrdm_state_switch (struct powerdomain *pwrdm); -int pwrdm_clkdm_state_switch (struct clockdomain *clkdm);int pwrdm_pre_transition (void );int pwrdm_post_transition (void );int pwrdm_set_lowpwrstchange (struct powerdomain *pwrdm);
Signature · 1 line
1.7.4.1
Paul Walmsley
maintainerPATCH 2/2 ARM: OMAP: powerdomain: Get rid off duplicate pwrdm_clkdm_state_switch() API
Quoted 10 lines · Santosh Shilimkar
With patch 'ARM: OMAP: powerdomain: Wait for powerdomain transition in
pwrdm_state_switch()', thepwrdm_clkdm_state_switch()API becomes duplicate ofpwrdm_state_switch().Get rid off duplicate
pwrdm_clkdm_state_switch()and update the users of it withpwrdm_state_switch()Signed-off-by Santosh Shilimkar <[email protected]>CC Rajendra Nayak <[email protected]>CC Paul Walmsley <[email protected]>
Thanks, queued for 3.5.
- Paul
cover ARM: OMAP4: powerdomain: Misc powerdomain fix and associated cleanup
In reply to Santosh ShilimkarQuoted 5 lines · Santosh Shilimkar
Paul,
Can you please have at this series ?
First patch is the bug fix and second one is the cleanup which you proposed some time back.
In $subject
s/OMAP4/OMAP
Regards
Santosh