[U-Boot] [PATCH v0] 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 --- drivers/mmc/davinci_mmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c index ee8f261..d5a38a7 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(®s->mmcdrr);

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 11/29/12 06:06, Davide Bonfanti wrote:
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
Andy, please take this for your MMC tree, thanks!
- -- Tom

On Thu, Nov 29, 2012 at 5:06 AM, Davide Bonfanti <davide.bonfanti@bticino.it
wrote:
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
drivers/mmc/davinci_mmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
In the future, please make sure your patches haven't been mangled. The tabs are broken, and git was at a loss as to how to resolve the "merge conflicts" from that. I have applied it by hand.
Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir des informations sensibles et/ ou confidentielles ne devant pas être divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous recevez ce message par erreur), nous vous remercions de le notifier immédiatement à son expéditeur, et de détruire ce message. Toute copie, divulgation, modification, utilisation ou diffusion, non autorisée, directe ou indirecte, de tout ou partie de ce message, est strictement interdite.
This e-mail, and any document attached hereby, may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized, direct or indirect, copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.
Also, note that I have chosen to ignore this warning, but really wish you wouldn't put me in an awkward legal position by declaring that copying your open-source code is forbidden. In French, even.
participants (3)
-
Andy Fleming
-
Davide Bonfanti
-
Tom Rini