Qi didn't work with my uSD, workaround found

Michael Buesch mb at bu3sch.de
Sat Dec 13 20:42:00 CET 2008


On Saturday 13 December 2008 19:56:44 Andy Green wrote:
> Somebody in the thread at some point said:
> | On Saturday 13 December 2008 19:05:43 Joerg Reisenweber wrote:
> |>>                 udelay(100000);
> |>>                 udelay(100000);
> |>>                 udelay(100000);
> |> WTF? anything wrong with a single "udelay(600000);" instead of
> 1+1+1+3? Maybe
> |> even 1,000,000 for all the SD crap to come
> |
> | udelay is not designed for huge values.
> | I think you should try hard to convert this into an msleep()
> | Delaying 1 second with udelay is not acceptable.
> | 300msec actually is pretty big for udelay, too.
> |
> | Why can't we use msleep() here? Any spinlocks held?
> 
> It would be good advice, but this is in Qi bootloader, not Linux. 

Whoops. Ignore my comment then :)

anyway, IMO raising the retries value is better than raising the delay.
This lowers the average time this thing loops.
What about udelay(10000) and retries * 600?

-- 
Greetings, Michael.



More information about the openmoko-kernel mailing list