[U-Boot] mmc: different SD SCR read from U-Boot than from Linux

Damien Miliche damien.miliche at dinauz.org
Thu Aug 2 07:00:09 UTC 2018


Hi,


I bought recently a new µSD card for an embedded system based on u-boot 
and Linux.
Reading the Linux kernel image (4.5MB) takes u-boot 18s (240.2 KiB/s), 
instead of 0.6s (7.1 MiB/s) with another µSD card (same HW, same µSD 
structure and content).

Both are specified as Class 4 card.

While debugging (sd_change_freq in mmc.c), u-boot reads the following 
value from the SCR register:

    scr[0]: 0000b5*00*
    scr[1]: 00000000

i.e. it considers SD_VERSION_1_0 as mmc->version, so that it skips 
switching the speed to a higher one.

When analyzing the same µSD card on a Linux system, I get:

*cat /sys/block/mmcblk0/device/scr* 	**02*b5000000000000*
*mmc scr read /sys/block/mmcblk0/device/* 	*

type: 'SD'

version: SD 2.00

bus widths: 4bit, 1bit,

*


i.e. Linux considers it supports version 2.00 of the Physical Spec, and 
the speed is OK.

It appears as u-boot and Linux read/receive different values for the 1st 
byte of the SCR register from the µSD.

Do you have any idea what could be the cause of it?


Thanks in advance.


Kind regards,

-- 
Damien


More information about the U-Boot mailing list