diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2017-09-21 16:30:10 +0200 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2018-01-12 18:11:04 +0900 |
commit | 83dc42271f79202b746bc9614817b41a6911c88f (patch) | |
tree | 493393ae4d5d9b0cd3997d19f647f7a377a4ca12 /include | |
parent | 01298da31d92ecc46cf9130d8cff68bc51698197 (diff) | |
download | u-boot-83dc42271f79202b746bc9614817b41a6911c88f.tar.gz u-boot-83dc42271f79202b746bc9614817b41a6911c88f.tar.bz2 u-boot-83dc42271f79202b746bc9614817b41a6911c88f.zip |
mmc: Retry some MMC cmds on failure
With certain SD cards like Kingston 8GB/16GB UHS card, it is seen that
MMC_CMD_ALL_SEND_CID cmd fails on first attempt, but succeeds
subsequently. Therefore, retry MMC_CMD_ALL_SEND_CID cmd a few time
as done in Linux kernel.
Similarly, it is seen that MMC_CMD_SET_BLOCKLEN may fail on first
attempt, therefore retry this cmd a few times as done in kernel.
To make it clear that those are optionnal workarounds, a new Kconfig
option 'MMC_QUIRKS' is added (enabled by default).
Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/mmc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h index a8901bffc7..a9ebc880cb 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -306,6 +306,9 @@ static inline bool mmc_is_tuning_cmd(uint cmdidx) #define ENHNCD_SUPPORT (0x2) #define PART_ENH_ATTRIB (0x1f) +#define MMC_QUIRK_RETRY_SEND_CID BIT(0) +#define MMC_QUIRK_RETRY_SET_BLOCKLEN BIT(1) + enum mmc_voltage { MMC_SIGNAL_VOLTAGE_000 = 0, MMC_SIGNAL_VOLTAGE_120, @@ -591,6 +594,7 @@ struct mmc { * operating mode due to limitations when * accessing the boot partitions */ + u32 quirks; }; struct mmc_hwpart_conf { |