]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mmc: Improve reliability of mmc_select_hs400()
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 28 Oct 2015 12:25:43 +0000 (14:25 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 9 Nov 2015 12:16:32 +0000 (13:16 +0100)
commitd83238a37ec7ddb106efdb746d77528536fad199
tree8b4319a8e9ec6464bf844457f5cc3702e92b06da
parentb7bdcbe357aa8ac27c76338176c65c2446f8d785
mmc: mmc: Improve reliability of mmc_select_hs400()

mmc_select_hs400() calls __mmc_switch() which checks the switch is
successful using CMD13 (SEND_STATUS).  The problem is that it does that
using the timing settings of the previous mode.  That is prone to error,
especially when switching from HS to HS400 because the timing parameters
for HS mode are tighter than the timing parameters for HS400 mode.

In the case when CMD13 polling is used (i.e. not MMC_CAP_WAIT_WHILE_BUSY)
with the switch command, it must be assumed that using different modes on
the card and host must work.

However in the case when CMD13 polling is not used
(i.e. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs400() can be made more
reliable by setting the host to the correct timing before sending CMD13.

This patch does that.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: <stable@vger.kernel.org> # 4.2+
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c