
Michael Cashwell <mboards <at> prograde.net> writes:
Greetings,
I've been fighting an odd problem with a custom OMAP4 board throwing MMC
errors.
It seems that a 4-bit-wide uSD card on MMC1 works but an 8-bit-wide eMMC part on MMC2 has problems.
As sometimes happens, in trying to track down the problem the presence of a debugging printf() masked the error.
Just now I've finally gotten a good trace on this. In drivers/mmc/omap_hsmmc.c near line 380, if I have:
writel(cmd->cmdarg, &mmc_base->arg); writel((cmd->cmdidx << 24) | flags, &mmc_base->cmd); printf("%s : <at> %p cmd 0x%08x arg 0x%08x\n", __func__, mmc_base,
cmd->cmdidx, cmd->cmdarg);
With or without that printf() the code fails when I select MMC2 (eMMC):
<snip>
If I instead put the printf() or a udelay(20) (anything less than 20 still failed) *between* the two writel() calls it works:
I had a similar problem with recent u-boot on OMAP 4430SDP board. With my rather old MMC, I was unable to boot at all:
U-Boot SPL 2013.04 (May 10 2013 - 08:20:30) OMAP4430 ES2.1 OMAP SD/MMC: 0 mmc_send_cmd : timeout: No status update Card did not respond to voltage select! spl: mmc init failed: err - -17 ### ERROR ### Please RESET the board ###
With newer MMC, I can boot, but I see an error from u-boot:
mmc_send_cmd : timeout: No status update
Adding udelay to the place you mention fixes both problems.
Tomi