summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-27 16:03:21 +0100
committerWolfgang Denk <wd@denx.de>2011-11-27 16:03:21 +0100
commit99258c34103efad3395c679256a221731d010c4b (patch)
tree19ad64086e1551cd8f94eb9cdca0eb1335def970 /drivers
parent1de55ef105f9e00ea313c91679fed6560c63f447 (diff)
parentafd5932b2c27c750ba7dbe39125916a45d2e1c13 (diff)
downloadtalos-obmc-uboot-99258c34103efad3395c679256a221731d010c4b.tar.gz
talos-obmc-uboot-99258c34103efad3395c679256a221731d010c4b.zip
Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc: Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec" mmc: mv_sdhci: Fix host version read for Armada100
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c16
-rw-r--r--drivers/mmc/mv_sdhci.c5
2 files changed, 6 insertions, 15 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 37ce6e85a1..21665ecc5b 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1190,7 +1190,7 @@ block_dev_desc_t *mmc_get_dev(int dev)
int mmc_init(struct mmc *mmc)
{
- int err, retry = 3;
+ int err;
if (mmc->has_init)
return 0;
@@ -1213,19 +1213,7 @@ int mmc_init(struct mmc *mmc)
mmc->part_num = 0;
/* Test for SD version 2 */
- /*
- * retry here for 3 times, as for some controller it has dynamic
- * clock gating, and only toggle out clk when the first cmd0 send
- * out, while some card strictly obey the 74 clocks rule, the interval
- * may not be sufficient between the cmd0 and this cmd8, retry to
- * fulfil the clock requirement
- */
- do {
- err = mmc_send_if_cond(mmc);
- } while (--retry > 0 && err);
-
- if (err)
- return err;
+ err = mmc_send_if_cond(mmc);
/* Now try to get the SD card's operating condition */
err = sd_send_op_cond(mmc);
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index f92caeb8fd..1501974e2f 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -48,7 +48,10 @@ int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks)
mv_ops.write_b = mv_sdhci_writeb;
host->ops = &mv_ops;
#endif
- host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
+ if (quirks & SDHCI_QUIRK_REG32_RW)
+ host->version = sdhci_readl(host, SDHCI_HOST_VERSION - 2) >> 16;
+ else
+ host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
add_sdhci(host, max_clk, min_clk);
return 0;
}
OpenPOWER on IntegriCloud