linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP3: wait on IDLEST after enabling USBTLL fclk
@ 2010-05-06  6:28 Anand Gadiyar
  2010-06-18 20:55 ` Gadiyar, Anand
  2010-06-21 15:07 ` Kevin Hilman
  0 siblings, 2 replies; 10+ messages in thread
From: Anand Gadiyar @ 2010-05-06  6:28 UTC (permalink / raw)
  To: linux-omap, Tony Lindgren; +Cc: Anand Gadiyar

We need to wait on the IDLEST bit after the clocks are enabled
before attempting to access any register.

Currently, the USBTLL i-clock ops uses the clkops_omap2_dflt_wait,
while the USBTLL f-clock ops uses clkops_omap2_dflt. If the
i-clock is enabled first, the clkops_omap2_dflt_wait is
short-circuited as the companion f-clock is not enabled.
This can cause a data abort if the IDLEST has not transitioned,
and we try to access a USBTLL register.

Since the USBTLL i-clock and f-clock could be enabled in any order,
this is a bug. Fix it by changing the clkops for the f-clock.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---

 arch/arm/mach-omap2/clock3xxx_data.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-omap-2.6/arch/arm/mach-omap2/clock3xxx_data.c
===================================================================
--- linux-omap-2.6.orig/arch/arm/mach-omap2/clock3xxx_data.c
+++ linux-omap-2.6/arch/arm/mach-omap2/clock3xxx_data.c
@@ -1484,7 +1484,7 @@ static struct clk ts_fck = {
 
 static struct clk usbtll_fck = {
 	.name		= "usbtll_fck",
-	.ops		= &clkops_omap2_dflt,
+	.ops		= &clkops_omap2_dflt_wait,
 	.parent		= &dpll5_m2_ck,
 	.enable_reg	= OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
 	.enable_bit	= OMAP3430ES2_EN_USBTLL_SHIFT,

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-01 16:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06  6:28 [PATCH] OMAP3: wait on IDLEST after enabling USBTLL fclk Anand Gadiyar
2010-06-18 20:55 ` Gadiyar, Anand
2010-06-21 21:45   ` Paul Walmsley
2010-06-22 16:46     ` Gadiyar, Anand
2010-06-24  0:20     ` Paul Walmsley
2010-06-24  6:08       ` Gadiyar, Anand
2010-06-24  6:28         ` Paul Walmsley
2010-07-01 10:53           ` Tony Lindgren
2010-07-01 16:48             ` Paul Walmsley
2010-06-21 15:07 ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).