summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHaibo Chen <haibo.chen@nxp.com>2017-05-15 17:25:31 +0800
committerAnson Huang <Anson.Huang@nxp.com>2017-06-09 22:22:34 +0800
commit5c6e3ded38e9fdf0946742b9286591cafb6df6bd (patch)
tree490dced0b27d43881b347c8df27604cd35b18f07 /drivers/mmc
parentde84df93e5b72b8040d1c63fdb2b8fcb10c7cbbe (diff)
MLK-14861-1 mmc: sdhci: make DDR50 tuning optionally
commit 70f2d20917bc ("MLK-14884 mmc: sdhci: make DDR50 tuning optionally") want to make DDR50 card tuning optionally, but the code logic is not right, the tuning of DDR50 card will also be impacted by the flag 'SDHCI_SDR50_NEEDS_TUNING'. e.g. imx6sl/imx6sx/imx6ul/imx7d default set USE_TUNING_SDR50, which means on these SoC, DDR50 card still do tuning even haven't the flag 'SDHCI_DDR50_NEEDS_TUNING'. This patch fix the logic issue, separate DDR50 and SDR50 card. Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index ac2182bcd4a6..d09cbf5695f4 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1993,9 +1993,12 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
break;
case MMC_TIMING_UHS_SDR50:
+ if (host->flags & SDHCI_SDR50_NEEDS_TUNING)
+ break;
+ /* FALLTHROUGH */
+
case MMC_TIMING_UHS_DDR50:
- if ((host->flags & SDHCI_SDR50_NEEDS_TUNING) ||
- (host->flags & SDHCI_DDR50_NEEDS_TUNING))
+ if (host->flags & SDHCI_DDR50_NEEDS_TUNING)
break;
/* FALLTHROUGH */