summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Bonfanti <davide.bonfanti@bticino.it>2012-11-29 01:06:53 +0000
committerAndy Fleming <afleming@freescale.com>2013-05-06 16:26:24 -0500
commit3ba36d603a6fc2806fc55fd814d8c5cc4ca93547 (patch)
treebe2ab3ab5d02bc2924cbf2d6af42c2e407150a0f
parente95504497ecac46907204b0ee3460b708a2981ac (diff)
downloadu-boot-imx-3ba36d603a6fc2806fc55fd814d8c5cc4ca93547.zip
u-boot-imx-3ba36d603a6fc2806fc55fd814d8c5cc4ca93547.tar.gz
u-boot-imx-3ba36d603a6fc2806fc55fd814d8c5cc4ca93547.tar.bz2
davinci, mmc: Added a delay reading ext CSD register
Without this additional delay, some eMMC don't negotiate properly bus width Tested on: - Toshiba THGBM2G8D8FBAIB - Toshiba THGBM4G4D1HBAR - Micron MTFC4GMVEA (the one giving the problem) - Hynix H26M64002BNR - SanDisk SDIN5E1-32G Signed-off-by: Davide Bonfanti <davide.bonfanti@bticino.it> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
-rw-r--r--drivers/mmc/davinci_mmc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index e2379e3..5aa2184 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -285,8 +285,11 @@ dmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
*/
if (bytes_left > fifo_bytes)
dmmc_wait_fifo_status(regs, 0x4a);
- else if (bytes_left == fifo_bytes)
+ else if (bytes_left == fifo_bytes) {
dmmc_wait_fifo_status(regs, 0x40);
+ if (cmd->cmdidx == MMC_CMD_SEND_EXT_CSD)
+ udelay(600);
+ }
for (i = 0; bytes_left && (i < fifo_words); i++) {
cmddata = get_val(&regs->mmcdrr);