From: "Andreas Müller" <schnitzeltony@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap: mmc: Raise timeout value to 20ms
Date: Wed, 11 Jan 2012 16:31:37 +0100 [thread overview]
Message-ID: <201201111631.38167.schnitzeltony@gmx.de> (raw)
On Wednesday, January 04, 2012 01:22:29 AM Peter Bigot <bigotp@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?
Andreas
next reply other threads:[~2012-01-11 15:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 15:31 Andreas Müller [this message]
2012-01-11 15:34 ` [U-Boot] [PATCH] omap: mmc: Raise timeout value to 20ms Tom Rini
2012-01-11 15:39 ` Peter Bigot
-- strict thread matches above, loose matches on Subject: below --
2012-01-25 10:35 Andreas Müller
2012-01-25 18:31 ` Tom Rini
2012-01-03 20:24 Tom Rini
2012-01-03 20:50 ` Peter Bigot
2012-01-03 21:03 ` Tom Rini
2012-01-03 21:06 ` Peter Bigot
2012-01-04 0:22 ` Peter Bigot
2012-01-04 13:47 ` Andreas Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201201111631.38167.schnitzeltony@gmx.de \
--to=schnitzeltony@gmx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox