mmc: sdhci: Program a relatively accurate SW timeout value
authorKishon Vijay Abraham I <kishon@ti.com>
Fri, 27 Apr 2018 11:47:17 +0000 (17:17 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 3 May 2018 07:36:20 +0000 (09:36 +0200)
commitfc1fa1b7db27546803905feef403cedf40ca027a
treed649284a31fde36d72e46bd18e3f7ce7917f997c
parent0bb28d738fb2066b314d0fe2eccffd1cab59517b
mmc: sdhci: Program a relatively accurate SW timeout value

sdhci has a 10 second timeout to catch devices that stop responding.
In the case of quirk SDHCI_QUIRK2_DISABLE_HW_TIMEOUT, instead of
programming 10 second arbitrary value, calculate the total time it would
take for the entire transfer to happen and program the timeout value
accordingly.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h