0

I get the following warning on debian linux (kernel 4.18.8) bootup of my microchip sama5d3 board:

mmc0: unrecognised SCR structure version 4
mmc0: error -22 whilst initialising SD card

after spewing this about 30 times I get the following and the linux boot completes

mmc0: host does not support reading read-only switch, assuming write-enable
mmc0: new SDHC card at address 0007
mmcblk0: mmc0:0007 SD4GB 3.71 GiB 

I have tried several different SD cards and get the same result, with the only variation being the version number.

I found the following online https://groups.google.com/forum/#!topic/beagleboard/A4zfNvyMmVI:

SCR is a register defined by MMC/SD standard, and the data should be read by the data bus, instead of the cmd bus as most predefined registers do. The omap_hsmmc_request function of the TI HSMMC driver tries to read in the SCR data by DMA, and this always returns garbage. Sometimes the SCR check gets passed, because the garbage data happens to be a valid SCR data

The linux kernel just checks to see if the SCR version is not 0, if so it produces the error.

My dts file for mmc0 is as follows:

    mmc0: mmc@f0000000 {
        pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3>;
        status = "okay";
        slot@0 {
            reg = <0>;
            bus-width = <8>;
        };
    };
0

Updating to kernel 4.20 the error no longer appears. I can't determine exactly which kernel commit fixed it. There are a few that might have played a roll, but nothing I could identify as an exact fit.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.