• Minda Chen's avatar
    mmc: sdhci-sirf: add sirf tuning function (cmd 19) · fc0b638a
    Minda Chen authored
    Add manual tuning function in CSR atlas7 SoC. It is mainly used
    for the UHS-I SD card working SDR50 SDR104 mode.
    
    The tuning principle can be seen in SD spec part1 v3.01 4.2.4.5
    (tuning command).
    
    SD host send the cmd19 and set the delay value(0-127).
    and the sdcard return 64 bytes data. If the data is same with
    the tuning data. The delay value is valid. Execute this commmand
    128 times. And calculate the longest window of the valid values.
    The value in the middle of this window is the best value.
    Signed-off-by: default avatarMinda Chen <Minda.Chen@csr.com>
    Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    fc0b638a
sdhci-sirf.c 6.63 KB