public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org,
	santosh.shilimkar@ti.com
Subject: Re: [PATCH] OMAP4: HSMMC cmd line reset change
Date: Thu, 16 Sep 2010 22:27:55 +0100	[thread overview]
Message-ID: <20100916212754.GA24253@void.printf.net> (raw)
In-Reply-To: <51627.192.168.10.89.1284595091.squirrel@dbdmail.itg.ti.com>

Hi Madhu,

On Thu, Sep 16, 2010 at 05:28:11AM +0530, Madhusudhan Chikkature wrote:
> OMAP4: HSMMC cmd line reset change

Please don't repeat the subject line like this -- "git am" will put it
into the patch twice.  You can either leave the subject line out of the
body of the mail altogether, or put "Subject: " in front of it.

> The cmd line reset logic is changed in OMAP4 ES2. The new procedure
> is to monitor a 0->1 transition and then 1->0 transition.The earlier
> logic would fail on ES2 chips because the loop could exit even before
> the reset is actually complete.
> 
> Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 4526d27..750ba7d 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -976,12 +976,19 @@ static inline void omap_hsmmc_reset_controller_fsm(struct
> omap_hsmmc_host *host,

(This was line-wrapped, I fixed it.)

>  						   unsigned long bit)
>  {
>  	unsigned long i = 0;
> +	unsigned long j = 0;
>  	unsigned long limit = (loops_per_jiffy *
>  				msecs_to_jiffies(MMC_TIMEOUT_MS));
> 
>  	OMAP_HSMMC_WRITE(host->base, SYSCTL,
>  			 OMAP_HSMMC_READ(host->base, SYSCTL) | bit);
> 
> +	if (cpu_is_omap44xx() && bit == SRC) {
> +		while ((!(OMAP_HSMMC_READ(host->base, SYSCTL) & bit))
> +				&& (j++ < limit))
> +			cpu_relax();
> +	}
> +
>  	while ((OMAP_HSMMC_READ(host->base, SYSCTL) & bit) &&
>  		(i++ < limit))
>  		cpu_relax();
> -- 
> 1.7.0.4

Thanks, pushed to mmc-next.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2010-09-16 21:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15 23:58 [PATCH] OMAP4: HSMMC cmd line reset change Madhusudhan Chikkature
2010-09-16 21:27 ` Chris Ball [this message]
2010-09-17 15:48 ` Tony Lindgren
2010-09-20 16:14   ` Madhusudhan
2010-09-21 14:47     ` Tony Lindgren
2010-09-22 17:13       ` Madhusudhan
2010-09-22 17:25         ` Chris Ball

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=20100916212754.GA24253@void.printf.net \
    --to=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=madhu.cr@ti.com \
    --cc=santosh.shilimkar@ti.com \
    /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