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
This commit is contained in:
Wolfgang Denk 2011-11-27 16:03:21 +01:00
commit 99258c3410
3 changed files with 7 additions and 15 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -215,6 +215,7 @@
* quirks
*/
#define SDHCI_QUIRK_32BIT_DMA_ADDR (1 << 0)
#define SDHCI_QUIRK_REG32_RW (1 << 1)
/* to make gcc happy */
struct sdhci_host;