* [PATCH] OMAP: wait for pwrdm transition after clk_enable()
@ 2008-12-12 7:48 Tomi Valkeinen
2008-12-15 22:37 ` Paul Walmsley
0 siblings, 1 reply; 3+ messages in thread
From: Tomi Valkeinen @ 2008-12-12 7:48 UTC (permalink / raw)
To: linux-omap; +Cc: Tomi Valkeinen
Enabling clock in a disabled power domain causes the power domain to be
turned on. However, the power transition is not always finished when
clk_enable() returns and this randomly crashes the kernel when an
interrupt happens right after the clk_enable, and the kernel tries to
read the irq status register for that domain.
Why the irq status register is inaccessible, I don't know. Also it
doesn't seem to be related to the module being not powered up, but to
the transition itself.
The same could perhaps happen after clk_disable also, but I have not
witnessed that.
The problem affects at least dss, cam and sgx clocks.
This change waits for the transition to be finished before returning
from omap2_clkdm_clk_enable().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
arch/arm/mach-omap2/clockdomain.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index fa62f14..f713d0b 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -567,6 +567,8 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
else
omap2_clkdm_wakeup(clkdm);
+ pwrdm_wait_transition(clkdm->pwrdm.ptr);
+
return 0;
}
--
1.6.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAP: wait for pwrdm transition after clk_enable()
2008-12-12 7:48 [PATCH] OMAP: wait for pwrdm transition after clk_enable() Tomi Valkeinen
@ 2008-12-15 22:37 ` Paul Walmsley
2008-12-15 22:47 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2008-12-15 22:37 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap
On Fri, 12 Dec 2008, Tomi Valkeinen wrote:
> Enabling clock in a disabled power domain causes the power domain to be
> turned on. However, the power transition is not always finished when
> clk_enable() returns and this randomly crashes the kernel when an
> interrupt happens right after the clk_enable, and the kernel tries to
> read the irq status register for that domain.
>
> Why the irq status register is inaccessible, I don't know. Also it
> doesn't seem to be related to the module being not powered up, but to
> the transition itself.
>
> The same could perhaps happen after clk_disable also, but I have not
> witnessed that.
>
> The problem affects at least dss, cam and sgx clocks.
>
> This change waits for the transition to be finished before returning
> from omap2_clkdm_clk_enable().
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
- Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAP: wait for pwrdm transition after clk_enable()
2008-12-15 22:37 ` Paul Walmsley
@ 2008-12-15 22:47 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2008-12-15 22:47 UTC (permalink / raw)
To: Paul Walmsley; +Cc: Tomi Valkeinen, linux-omap
* Paul Walmsley <paul@pwsan.com> [081215 14:37]:
> On Fri, 12 Dec 2008, Tomi Valkeinen wrote:
>
> > Enabling clock in a disabled power domain causes the power domain to be
> > turned on. However, the power transition is not always finished when
> > clk_enable() returns and this randomly crashes the kernel when an
> > interrupt happens right after the clk_enable, and the kernel tries to
> > read the irq status register for that domain.
> >
> > Why the irq status register is inaccessible, I don't know. Also it
> > doesn't seem to be related to the module being not powered up, but to
> > the transition itself.
> >
> > The same could perhaps happen after clk_disable also, but I have not
> > witnessed that.
> >
> > The problem affects at least dss, cam and sgx clocks.
> >
> > This change waits for the transition to be finished before returning
> > from omap2_clkdm_clk_enable().
> >
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
>
> Acked-by: Paul Walmsley <paul@pwsan.com>
Pushing to l-o tree, and adding to omap-fixes queue for upstream.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-15 22:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 7:48 [PATCH] OMAP: wait for pwrdm transition after clk_enable() Tomi Valkeinen
2008-12-15 22:37 ` Paul Walmsley
2008-12-15 22:47 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox