]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
OMAP: McBSP: Use appropriate value for startup delay
authorEduardo Valentin <eduardo.valentin@nokia.com>
Thu, 20 Aug 2009 13:18:09 +0000 (16:18 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 20 Aug 2009 19:10:25 +0000 (20:10 +0100)
Increasing startup delay value as worst case:
 CLKSRG*2 = 8000khz: (1/8000) * 2 * 2 usec

Although, 100us may give enough time for two CLKSRG,
due to some unknown PM related, clock gating etc. reason,
this patch increases it to 500us.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
arch/arm/plat-omap/mcbsp.c

index 0aa2524186fbbf31dbf1a68166caab4ad4a90dd5..e9dd70320f7d9564fee7fd870b0db7c1de4bbc62 100644 (file)
@@ -365,7 +365,13 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx)
        w = OMAP_MCBSP_READ(io_base, SPCR1);
        OMAP_MCBSP_WRITE(io_base, SPCR1, w | (rx & 1));
 
-       udelay(100);
+       /*
+        * Worst case: CLKSRG*2 = 8000khz: (1/8000) * 2 * 2 usec
+        * REVISIT: 100us may give enough time for two CLKSRG, however
+        * due to some unknown PM related, clock gating etc. reason it
+        * is now at 500us.
+        */
+       udelay(500);
 
        if (idle) {
                /* Start frame sync */