[U-Boot] "No status update" errors in OMAP mmc_send_cmd()
Michael Cashwell
mboards at prograde.net
Mon Apr 8 21:31:05 CEST 2013
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 : @ %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):
u-boot # mmc dev 1
mmc_send_cmd : @ 480b4100 cmd 0x00000000 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x000001aa
mmc_send_cmd : @ 480b4100 cmd 0x00000037 arg 0x00000000
mmc_send_cmd : timeout on cmd 55. No status update (base 480b4100) << 1s delay
mmc_send_cmd : @ 480b4100 cmd 0x00000000 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000002 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000003 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000009 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x0000000d arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000007 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000006 arg 0x03b90100
mmc_send_cmd : @ 480b4100 cmd 0x0000000d arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000006 arg 0x03b70100
mmc_send_cmd : @ 480b4100 cmd 0x0000000d arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000010 arg 0x00000200
mmc_send_cmd : @ 480b4100 cmd 0x00000011 arg 0x00000000
mmc1(part 0) is current device
If I instead put the printf() or a udelay(20) (anything less than
20 still failed) *between* the two writel() calls it works:
u-boot # mmc dev 1
mmc_send_cmd : @ 480b4100 cmd 0x00000000 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x000001aa
mmc_send_cmd : @ 480b4100 cmd 0x00000037 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000000 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000001 arg 0x40300080
mmc_send_cmd : @ 480b4100 cmd 0x00000002 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000003 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000009 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x0000000d arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000007 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000006 arg 0x03b90100
mmc_send_cmd : @ 480b4100 cmd 0x0000000d arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000006 arg 0x03b70100
mmc_send_cmd : @ 480b4100 cmd 0x0000000d arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000008 arg 0x00000000
mmc_send_cmd : @ 480b4100 cmd 0x00000010 arg 0x00000200
mmc_send_cmd : @ 480b4100 cmd 0x00000011 arg 0x00000000
mmc1(part 0) is current device
So writing to the command register "too soon" after writing to the
dependent data registers sometimes fails.
Obviously a magic-number udelay() is a hack. I'm going to dive into
the data sheet but wanted to ask here if this is familiar to anyone.
Thanks,
-Michael Cashwell
More information about the U-Boot
mailing list