SD resume timing

Mitch Bradley wmb at laptop.org
Wed Jan 9 18:48:06 EST 2008


At today's bug status meeting, I was asked to investigate SD card resume 
timing from OFW.

The range was 24 mS to 187 mS , depending on which SD card is plugged in.

The fixed component of that time is about 5 mS, including re-initing the 
host controller and issuing a sequence of card commands that determine 
which kind of card you have (SD, SDHC, MMC, etc).

The variable component is the "wait for card to power up" step - you 
have to repeatedly issue a "set operating conditions" command until you 
get a specific response indicating that the card is ready.

I tried all of the cards I have multiple times, with consistent 
results.  After the tested resume sequence, reads from the card worked.

Here is the variable component of the time for my cards:

 19 mS  PQI 2GB SD "Hi-Speed 150"
 37 mS  SanDisk 32 MB SD
 41 mS  SanDisk 1GB SD "Extreme III"
 73 mS  Kingston 256 MB MMC+
 75 mS  Transcend 4GB SD "150x"
182 mS Panasonic 512 MB SD "Pro high speed"

I don't have any SDHC cards.

If you wish to try the tests yourself, here is a recipe:

ok select /sd
ok patch 0 14 attach-card
ok patch 0 14 attach-card
ok patch 0 a attach-card
ok patch 400 64 wait-powered
ok patch 1 a wait-powered

ok s t( setup-host attach-card drop )t

After you issue the last command, press the power button to resume; the 
SD resume time will be displayed in microseconds. You can repeat that 
last command as necessary, inserting new cards if you wish.

The patches shorten various time delays that are in the existing driver. 
Empirically, all of my cards seem to work fine without those delays.  
The first 3 patches eliminate a total of 50 mS (0x14 + 0x14 + 0x0a) from 
the fixed component of the time.  The last 2 patches decrease the 
granularity of the variable component of the time from 10 mS to 1 mS.






More information about the Devel mailing list