diff options
author | Asutosh Das <asutoshd@codeaurora.org> | 2017-03-30 14:41:16 -0700 |
---|---|---|
committer | Subhash Jadavani <subhashj@codeaurora.org> | 2017-04-03 10:43:14 -0700 |
commit | 0cbf1d2db710f0b9fb0b63934d214b2ef19cd650 (patch) | |
tree | 18f031fea0300976abd537f6556a096e28edf3bd /include/linux/mmc/host.h | |
parent | a4b36d773babd517b8208d487ea6beb060aab610 (diff) |
mmc: sd: reduce the bus speed in case of multiple CRC errors in SDR104
UHS-I SD cards support SDR104 mode which runs the SD card interface
clock upto 208 MHz. But we may see repeated CRC errors in SDR104
with some SDCC controllers. If this happens, this change would
reinit the card to lower speed (SDR50) hoping that CRC error
rate would reduce at lower clock speed (100MHz for SDR50).
Change-Id: I140d29fdf500bb89881a0f2c1f768fe0c5afa9d5
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/linux/mmc/host.h')
-rw-r--r-- | include/linux/mmc/host.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 37069eb12861..d9e12c1b1748 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -729,6 +729,16 @@ static inline int mmc_host_uhs(struct mmc_host *host) MMC_CAP_UHS_DDR50); } +static inline void mmc_host_clear_sdr104(struct mmc_host *host) +{ + host->caps &= ~MMC_CAP_UHS_SDR104; +} + +static inline void mmc_host_set_sdr104(struct mmc_host *host) +{ + host->caps |= MMC_CAP_UHS_SDR104; +} + static inline int mmc_host_packed_wr(struct mmc_host *host) { return host->caps2 & MMC_CAP2_PACKED_WR; |