Qi didn't work with my uSD, workaround found

Joerg Reisenweber joerg at openmoko.org
Sat Dec 13 19:05:43 CET 2008


Am Sa  13. Dezember 2008 schrieb Paul Fertser:
> Hi,
> 
> I've recently bought a new uSD card, Transcend TS8GUSDHC4 (8Gb, class
> 4) and was quite surprised it doesn't work with Qi. Having no debug
> board, i spent considerable time debugging by trial-and-error and
> found that Qi is able to load a kernel from it only after reboot (i
> have another kernel in NAND, that is loaded after uSD fails) but not
> after power-on. A strategically placed udelay solves the issue for me:
> 
> --- a/src/drivers/glamo-mmc.c
> +++ b/src/drivers/glamo-mmc.c
> @@ -674,14 +674,15 @@ int mmc_init(int verbose)
>         /* Well, either way let's say hello in SD card protocol */
>  
>         while (retries--) {
hmmm :-/ retries==?

>  
>                 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(300000);
>  
>                 resp = mmc_cmd(MMC_APP_CMD, 0x00000000,
>                         MMC_CMD_AC | MMC_RSP_R1, 0, 0, 0,
>                         (u16 *)&response[0]);
> 
> 
> I've tried lower values, 200000 never works and 250000 works
> unreliably. Also the "stable" kernel has problems mounting this card
> as root (unless started with logverbose=8), but andy-tracking works
> without problems.
[...]
> Here are some snippets (a bit lengthy) that might give an insight to
> the root of the problem (if at all necessary as 0.3s delay on startup
> doesn't matter too much):

maybe we should 'scope VDD for uSD on powerup, sdclk and data on second and 
3rd channel?
OTOH uSD might need some time just to init itself internally after powerup.
Hard to probe that.
However I wonder what's the story with the retires. Shouldn't that catch it?

/j
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20081214/7d6e5353/attachment.pgp 


More information about the openmoko-kernel mailing list