diff options
author | Wolfgang Denk <wd@denx.de> | 2012-05-20 19:20:50 (GMT) |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-05-20 19:20:50 (GMT) |
commit | 6bc337fb13003a9a949dfb2713e308fb97faae8a (patch) | |
tree | 3ce9b22609e6c1d3e140fd2fb96af0c26efa948d /drivers/mmc/mmc.c | |
parent | f50bf50d7f6f99c5ad4666d63a7eef43d3940500 (diff) | |
parent | 7d2d58b4e63a8307f713e6b17fdb9b2413548574 (diff) | |
download | u-boot-6bc337fb13003a9a949dfb2713e308fb97faae8a.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc:
ARM: SAMSUNG: support sdhci controller
mmc: support the sdhci instead of s5p_mmc for samsung-soc
mmc: add the quirk to use the sdhci for samsung-soc
mmc: sdhci: add the quirk for broken r1b response
i.MX28: Lower the amount of blocks transfered in one DMA cycle
mmc: fsl_esdhc: Poll until card is not busy anymore
include/mmc.h: remove struct mmc_csd
mmc: omap: handle controller errors properly
mmc: omap: improve stat wait message
mmc: omap: follow TRM procedure to power on cards
mmc:fix: Set mmc width according to MMC host capabilities
Diffstat (limited to 'drivers/mmc/mmc.c')
-rw-r--r-- | drivers/mmc/mmc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 596732e..aebe578 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1199,7 +1199,9 @@ int mmc_startup(struct mmc *mmc) else mmc_set_clock(mmc, 25000000); } else { - for (width = EXT_CSD_BUS_WIDTH_8; width >= 0; width--) { + width = ((mmc->host_caps & MMC_MODE_MASK_WIDTH_BITS) >> + MMC_MODE_WIDTH_BITS_SHIFT); + for (; width >= 0; width--) { /* Set the card to use 4 bit*/ err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, width); |