aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap.c
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2019-02-02 17:14:33 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2019-02-25 02:40:58 -0500
commita6327b5e57fdc679c842588c3be046c0b39cc127 (patch)
tree5e0ea919d29e3ab6ce9d553934572dd1e2ac1597 /drivers/mmc/host/omap.c
parent3c4019f979783575c50db35eae80f30b382e9e49 (diff)
mmc: omap: fix the maximum timeout setting
When running OMAP1 kernel on QEMU, MMC access is annoyingly noisy: MMC: CTO of 0xff and 0xfe cannot be used! MMC: CTO of 0xff and 0xfe cannot be used! MMC: CTO of 0xff and 0xfe cannot be used! [ad inf.] Emulator warnings appear to be valid. The TI document SPRU680 [1] ("OMAP5910 Dual-Core Processor MultiMedia Card/Secure Data Memory Card (MMC/SD) Reference Guide") page 36 states that the maximum timeout is 253 cycles and "0xff and 0xfe cannot be used". Fix by using 0xfd as the maximum timeout. Tested using QEMU 2.5 (Siemens SX1 machine, OMAP310), and also checked on real hardware using Palm TE (OMAP310), Nokia 770 (OMAP1710) and Nokia N810 (OMAP2420) that MMC works as before. [1] http://www.ti.com/lit/ug/spru680/spru680.pdf Fixes: 730c9b7e6630f ("[MMC] Add OMAP MMC host driver") Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r--drivers/mmc/host/omap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index c60a7625b1fa..b2873a2432b6 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -920,7 +920,7 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques
920 reg &= ~(1 << 5); 920 reg &= ~(1 << 5);
921 OMAP_MMC_WRITE(host, SDIO, reg); 921 OMAP_MMC_WRITE(host, SDIO, reg);
922 /* Set maximum timeout */ 922 /* Set maximum timeout */
923 OMAP_MMC_WRITE(host, CTO, 0xff); 923 OMAP_MMC_WRITE(host, CTO, 0xfd);
924} 924}
925 925
926static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req) 926static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req)