Skip to contentSkip to conversation

davinci, mmc: Added a delay reading ext CSD register

PATCH New Davide Bonfanti 3 participants 3 messages Nov 29, 2012 – May 6, 2013 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 drivers/mmc/davinci_mmc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/davinci_mmc.c +4 -1
index ee8f261..d5a38a7 100644
@@ -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);
Signature · 20 lines
1.7.9.5



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.
#1 lore raw

PATCH 1/1 davinci, mmc: Added a delay reading ext CSD register

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Davide Bonfanti

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

Andy, please take this for your MMC tree, thanks!

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQt50UAAoJENk4IS6UOR1WY/8P/05sFytV2CMqwEvZh325E1cS Ln6u/FeQSF8DMF/KHGprBRYCOxKwMrCSxs/qJxl0AnD4j5v8CFMacxN/HRo6ay9I YVOsTpa2wiDp9u6lxdO8ivrL5q+q0CRmKsItruXHaBqeJX3rSip4wT9Qb4WIhgPz r8WDlvlauBYF7BATUPqdXGDJWWJmJ2dy8jcarg86Ii6dHl88E43F6cCyD0MVpXn4 4m6T3YtQBLgl/D4wN+NPQcwCLQFEgYKG/rHKN1rDQeiOSvsIctGtXwhnPk3mFLQ9 6UqJpPoJHAwEgpCjPrGSuiKmtJY6A5qyHfvriRLD/LS3M9ylJzzzgm03gSn9FYF4 JP7DVmtol7licM8Vu7LNEcG2Iuiwh7/nmD0Iimg2SpgmG6JVCGCayQVTt6CsxuX4 zA52QA8X+hOPt76+nNmlRewrLepH0iFRWhoJ8/cCS5lLPYdzhC/JIlt/LAErzFwC yRNFyw9EH4IlYOmXYFxZye80Rv9l8fC3nCtoWGOxoR5uEqZkuSalCVrh/GrXu5q1 BVwqsukY3dxCCKc/PgEeDEAUh+9+RCJ9DTq0/AOYrDE0lHtP+uce72pR7MmPIpo9 DRV3YQjWclvnIb1LmV9rLYnOZbKSLS8XiVylbR5SW37eia8rQ3VGhXcPUkKrFWTb d+O32CkMw7KvcUTZJNWS
=TseB
-----END PGP SIGNATURE-----

#2 lore raw

PATCH 1/1 davinci, mmc: Added a delay reading ext CSD register

In reply to Davide Bonfanti

On Thu, Nov 29, 2012 at 5:06 AM, Davide Bonfanti <[email protected]

Quoted 10 lines

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

Quoted 5 lines
---
 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.

Quoted 12 lines

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.

Quoted 9 lines

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.