diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-10-21 20:52:35 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-10-28 11:02:16 +0900 |
commit | 2a1bedaa03a27b3d4a94f9e251f269814ed72e3e (patch) | |
tree | bfd47fdc3dfa07744bc716f467b9b8a574d3c364 /drivers | |
parent | 288db7c7c00acadf699a726deba2d9825bdd9c2b (diff) | |
download | u-boot-imx-2a1bedaa03a27b3d4a94f9e251f269814ed72e3e.zip u-boot-imx-2a1bedaa03a27b3d4a94f9e251f269814ed72e3e.tar.gz u-boot-imx-2a1bedaa03a27b3d4a94f9e251f269814ed72e3e.tar.bz2 |
mmc: sdhci: assign to clk_mul when host version is upper than SD3.0
To prevent the wrong value check the SD version.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/sdhci.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 10ff57e..766e9ee 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -608,9 +608,11 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, * In case of Host Controller v3.00, find out whether clock * multiplier is supported. */ - caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1); - host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >> - SDHCI_CLOCK_MUL_SHIFT; + if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { + caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1); + host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >> + SDHCI_CLOCK_MUL_SHIFT; + } return 0; } |