On Wed, Jan 11, 2012 at 8:31 AM, Andreas Müller <schnitzelt...@gmx.de> wrote: > On Wednesday, January 04, 2012 01:22:29 AM Peter Bigot <bigotp at acm.org> > wrote: >> I got this to work with two changes: >> >> * s/MMC_TIMEOUT_USEC/MMC_TIMEOUT_MSEC/g and define MMC_TIMEOUT_MSEC >> 20, since get_timer does operate on msec in the current meta-ti >> BeagleBoard-xM >> >> * The patch below, which is what I think fixes the real problem (that >> PSTATE.CMDI is still lit up when the function is entered). >> >> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c >> index c38b9e6..62b659a 100644 >> --- a/drivers/mmc/omap_hsmmc.c >> +++ b/drivers/mmc/omap_hsmmc.c >> @@ -198,7 +198,8 @@ static int mmc_send_cmd(struct mmc *mmc, struct >> mmc_cmd *cmd, >> ulong start; >> >> start = get_timer(0); >> - while ((readl(&mmc_base->pstate) & DATI_MASK) == DATI_CMDDIS) { >> +#define CMDI_MASK (0x1 << 0) >> + while ((readl(&mmc_base->pstate) & (DATI_MASK | CMDI_MASK))) { >> if (get_timer(0) - start > MAX_RETRY_MS) { >> printf("%s: timedout waiting for cmddis!\n", >> __func__); return TIMEOUT; >> >> Peter > I tested this with success and I think this is the correct solution. > Peter: can you send a proper patch for this?
I ordered the same card Peter sees failure on and it arrived yesterday. I'm formatting it now and will see if I can duplicate the problem here today. -- Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot