linux_dsm_epyc7002/drivers/mmc/core
Adrian Hunter 1815e61b1a mmc: mmc: Improve reliability of mmc_select_hs200()
Currently mmc_select_hs200() uses __mmc_switch() which checks the
success of the switch to HS200 mode using CMD13 (SEND_STATUS).
The problem is that it does that using the timing settings of legacy
mode.  That is prone to error, not least because the timing parameters
for legacy mode are tighter than the timing parameters for HS200 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_hs200() can be made more
reliable by setting the host to the correct timing before sending CMD13.

This patch does that.

A complication is that the caller, mmc_select_timing(), will ignore a
switch error (indicated by -EBADMSG), assume the old mode is valid
and continue, so the old timing must be restored in that case.

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>
2015-11-09 13:12:08 +01:00
..
bus.c
bus.h
core.c mmc: core: Add mmc_regulator_set_vqmmc() 2015-10-26 16:00:10 +01:00
core.h mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
debugfs.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
host.c mmc: core: Add DT bindings for eMMC hardware reset support 2015-10-27 10:21:15 +01:00
host.h
Kconfig mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
Makefile
mmc_ops.c mmc: mmc: extend the mmc_send_tuning() 2015-10-27 10:38:41 +01:00
mmc_ops.h mmc: core: Convert __mmc_switch() into an internal core function 2015-10-26 15:59:54 +01:00
mmc.c mmc: mmc: Improve reliability of mmc_select_hs200() 2015-11-09 13:12:08 +01:00
pwrseq_emmc.c mmc: pwrseq: Use highest priority for eMMC restart handler 2015-10-27 11:11:06 +01:00
pwrseq_simple.c mmc: pwrseq_simple: use GPIO descriptors array API 2015-10-26 15:59:59 +01:00
pwrseq.c
pwrseq.h
quirks.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
sd_ops.c
sd_ops.h
sd.c mmc: skip reclaiming host on mmc_add_card() error 2015-10-26 16:00:14 +01:00
sd.h
sdio_bus.c mmc: core: Attach PM domain prior probing of SDIO func driver 2015-06-04 10:03:51 +02:00
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c
sdio_irq.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
sdio_ops.c
sdio_ops.h mmc: Add mmc_is_io_op helper function 2015-10-26 16:00:01 +01:00
sdio.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
slot-gpio.c
slot-gpio.h