linux/drivers/mmc/core
Ulf Hansson b9ec26160f mmc: core: Fixup busy detection for mmc switch operations
If the host controller supports busy detection in HW, we expect the
MMC_CAP_WAIT_WHILE_BUSY to be set. Likewise the corresponding
host->max_busy_timeout should reflect the maximum busy detection
timeout supported by the host.

Previously we expected a host that supported MMC_CAP_WAIT_WHILE_BUSY to
cope with any timeout, which just isn't feasible due to HW limitations.

For most switch operations, R1B responses are expected and thus we need
to check for busy detection completion. To cope with cases where the
requested busy detection timeout is greater than what the host are able
to support, we fallback to use a R1 response instead. This will prevent
the host from doing HW busy detection.

In those cases, busy detection completion is handled by polling the for
the card's status using CMD13. This is the same mechanism used when the
host doesn't support MMC_CAP_WAIT_WHILE_BUSY.

Do note, a host->max_busy_timeout set to zero, is interpreted by the
mmc core as it don't know what the host supports. It will then provide
the host with whatever timeout the mmc core finds suitable.

For some cases the mmc core has unfurtunate no clue of what timeout to
use. In these cases we provide the host with a timeout value of zero,
which the host may interpret as use whatever timeout it finds suitable.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
2014-02-23 10:40:38 -05:00
..
bus.c mmc: core: Remove unnecessary validations for bus_ops callbacks 2014-02-13 22:58:23 -05:00
bus.h
core.c mmc: core: Add ignore_crc flag to __mmc_switch 2014-02-23 10:40:30 -05:00
core.h mmc: core: Let mmc_set_signal_voltage take ocr as parameter 2013-10-30 20:26:26 -04:00
debugfs.c
host.c mmc: core: Add DT bindings for eMMC HS200 1.8/1.2V 2014-02-22 13:51:14 -05:00
host.h
Kconfig mmc: core: Use MMC_UNSAFE_RESUME as default behavior 2014-02-13 22:58:15 -05:00
Makefile
mmc_ops.c mmc: core: Fixup busy detection for mmc switch operations 2014-02-23 10:40:38 -05:00
mmc_ops.h
mmc.c mmc: core: Add ignore_crc flag to __mmc_switch 2014-02-23 10:40:30 -05:00
quirks.c mmc: sdio: add a quirk for broken SDIO_CCCR_INTx polling 2014-01-17 22:55:01 -05:00
sd_ops.c
sd_ops.h
sd.c mmc: core: Use MMC_UNSAFE_RESUME as default behavior 2014-02-13 22:58:15 -05:00
sd.h
sdio_bus.c ACPI / bind: Redefine acpi_preset_companion() 2013-12-07 01:05:49 +01:00
sdio_bus.h
sdio_cis.c
sdio_cis.h
sdio_io.c
sdio_irq.c mmc: sdio: add a quirk for broken SDIO_CCCR_INTx polling 2014-01-17 22:55:01 -05:00
sdio_ops.c
sdio_ops.h
sdio.c mmc: core: Collect common code for card ocr validation 2013-10-30 20:26:31 -04:00
slot-gpio.c mmc: slot-gpio: Add debouncing capability to mmc_gpio_request_cd() 2013-08-24 23:45:09 -04:00