diff options
author | ernest.zhang <ernest.zhang@bayhubtech.com> | 2018-07-16 14:26:54 +0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-07-30 14:25:06 +0200 |
commit | 0086fc217d5d7ac2939c500733d1d046b9ac5012 (patch) | |
tree | 3224f2848bfca66a5fb8199744d89704b8c5c40f /drivers/mmc/host/sdhci.c | |
parent | 6663c419a046cdfcf3598b6d0855817b5c6287ae (diff) | |
download | linux-stable-0086fc217d5d7ac2939c500733d1d046b9ac5012.tar.gz linux-stable-0086fc217d5d7ac2939c500733d1d046b9ac5012.tar.bz2 linux-stable-0086fc217d5d7ac2939c500733d1d046b9ac5012.zip |
mmc: sdhci: Add support for O2 hardware tuning
Add hardware tuning function instead of software tuning because O2/Bayhub
SD host controller support hardware tuning.
Signed-off-by: ernest.zhang <ernest.zhang@bayhubtech.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index bcea179a8d70..1b3fbd9bd5c5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1029,7 +1029,9 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, if (data == NULL) { if (host->quirks2 & SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD) { - sdhci_writew(host, 0x0, SDHCI_TRANSFER_MODE); + /* must not clear SDHCI_TRANSFER_MODE when tuning */ + if (cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200) + sdhci_writew(host, 0x0, SDHCI_TRANSFER_MODE); } else { /* clear Auto CMD settings for no data CMDs */ mode = sdhci_readw(host, SDHCI_TRANSFER_MODE); |