diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-28 09:08:13 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-28 09:08:13 -0400 |
commit | ec1eaad06551e2422baf8743f6987d4f561f2ce6 (patch) | |
tree | cea238595cc2e821f1fa5a688e69b7e1540904e8 /drivers/mmc/sdhci.c | |
parent | c4762157cf49ae6556016267ec0a87d4aee9e572 (diff) | |
parent | 2a1bedaa03a27b3d4a94f9e251f269814ed72e3e (diff) |
Merge branch 'master' of http://git.denx.de/u-boot-mmc
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r-- | drivers/mmc/sdhci.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 837c53842b3..766e9eef84a 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -242,6 +242,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT); #ifdef CONFIG_MMC_SDMA + trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE); flush_cache(start_addr, trans_bytes); #endif sdhci_writew(host, SDHCI_MAKE_CMD(cmd->cmdidx, flags), SDHCI_COMMAND); @@ -607,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; } |