[U-Boot] OT: SD/MMC-over-SPI and speed in linux

Alexander Stein alexander.stein at systec-electronic.com
Thu May 6 15:33:53 CEST 2010


Hello Wolfgang,

Am Donnerstag, 6. Mai 2010 15:13:14 schrieb Wolfgang Wegner:
> In U-Boot, I can get read speeds with fatload of around 400 kBytes/second,
> which seems reasonable as the card can handle 25 MHz SPI speed. (And, it
> would be sufficient for our application.)

IIRC 400kBytes/second is the initial speed for SD cards on SPI. The card 
itself responds which max speed it can handle. Which could be adjusted later 
(up to 25MHz or even more).

> In the linux kernel, the read speed drops to around 35 kBytes/second,
> regardless of using a filesystem or not. This is not only quite ridiculous
> (as I would expect more optimized drivers in the kernel than in the
> bootloader), but would give us real performance problems when writing
> to the card. The SPI speed is detected and set correctly to 25 MHz by
> the driver.
> 
> Does anybody know if this is a known limitation in (older) linux
> mmc_spi implementation, or if this issue still exists? If it is
> solved, can anybody point me to a patch/discussion/keyword where I can
> find more information which part I would have to check or back-port?

I backported this spi_mmc driver to 2.6.10 (yes, even older) and it is slow, 
nevertheless.  I don't know how SPI is done in u-boot, but maybe the system 
interrupts in linux like ethernet and timer slow SPI transfer down.

Best regards
Alexander


More information about the U-Boot mailing list