• Adrian Hunter's avatar
    mmc: mmc: Fix HS setting in mmc_select_hs400() · 51b12f77
    Adrian Hunter authored
    mmc_select_hs400() begins with the card and host in HS200 mode.
    Therefore, any commands sent to the card should use HS200 timing.
    It is incorrect to set the host to High Speed (HS) timing before
    sending the switch command.  Doing so is unreliable because
    the timing parameters for HS mode are tighter than the timing
    parameters for HS200 mode.  Thus the HS timings should be set
    only after the card has switched mode.
    
    However, it is not unreasonable first to reduce the frequency to
    the HS mode frequency, which should make the switch command and
    subsequent CMD13 commands more reliable.
    
    This patch does that.
    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Cc: <stable@vger.kernel.org> # 4.2+
    Tested-by: default avatarAlim Akhtar <alim.akhtar@samsung.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    51b12f77
mmc.c 52.1 KB