linux-device-drivermmc

MMC errors during tuning execution


I am developing MMC driver in Linux. My system now is able to boot stably via eMMC and sdcard. But during the booting, I saw some errors generated on console.

[ 0.889357] mmc0: tuning execution failed: -5
[ 0.903700] mmc0: error -5 whilst initialising SD card

with some debug logs,

[ 0.976730] [DEBUG] mmc_sd_init_card
[ 1.143724] [DEBUG] mmc_execute_tuning
[ 1.219758] [DEBUG] tmio_mmc_execute_tuning: Tuning procedure failed = -5
[ 1.253255] [DEBUG] mmc_sd_init_uhs_card: err=-5

The error seemed to come from sd card initialization (UHS).

Despite the error, I was still able to use sdcard and eMMC once system completed the booting.

I am a little ambiguous about the error "tuning execution". Who can explain it and propose the fixing ? Thanks!


Solution

  • For more details, I have searched in the SD Card specification

    https://www.sdcard.org/downloads/pls/index.html

    And figure out some patches can deal with my issue.

    https://patchwork.kernel.org/patch/9963437/

    https://patchwork.kernel.org/patch/9998159/

    My board has:

      + sdhi0: used for sdcard 4-bit bus width 
      + sdhi2: used for on-board 8bit eMMC
      + sd-uhs-sdr50: SD UHS SDR50 speed is supported
      + sd-uhs-sdr104: SD UHS SDR104 speed is supported
      + mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported
      + mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported