All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Woodruff, Richard" <r-woodruff2@ti.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] - Fix MMC -- was  H4 boot with latest git kernel
Date: Sat, 10 Feb 2007 09:41:22 -0800	[thread overview]
Message-ID: <20070210174121.GA5291@atomide.com> (raw)
In-Reply-To: <3B6D69C3A9EBCA4BA5DA60D913027429509132@dlee13.ent.ti.com>

* Woodruff, Richard <r-woodruff2@ti.com> [070209 13:48]:
> Hi,
> 
> So took a quick look with the emulator and see its hanging in MMC.  I'm
> not an MMC expert but I don't see how you can send an init-stream
> command with no clocks running and if you did it looks like it should be
> 80clocks over 1ms.
> 
> The note in the upper layer in mmc.c says you power it first, then send
> clocks out.  mmc.c calls MMC_POWER_UP twice.  The first time with
> ios->clock = 0 and a second time with iso->clock=f_min.  To me that just
> says set the power bit in the first pass and set the initstream command
> in the second pass.
> 
> The below patch seems to work fine and would appear to be a long
> standing bug.
> 
> Signed-off-by: Richard Woodruff <r-woodruff2.com>
> 
> diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c
> index 796172a..55075cc 100644
> --- a/drivers/mmc/omap.c
> +++ b/drivers/mmc/omap.c
> @@ -990,7 +990,7 @@ static void mmc_omap_set_ios(struct mmc_
>  	 * Writing to the CON register twice seems to do the trick. */
>  	for (i = 0; i < 2; i++)
>  		OMAP_MMC_WRITE(host, CON, dsor);
> -	if (ios->power_mode == MMC_POWER_UP) {
> +	if ((ios->power_mode == MMC_POWER_UP) && ios->clock) {
>  		/* Send clock cycles, poll completion */
>  		OMAP_MMC_WRITE(host, IE, 0);
>  		OMAP_MMC_WRITE(host, STAT, 0xffff);
> 

Thanks. Looks like we're still doing the MMC powerup wrong for omap
though. I made a patch for that a while back but it got forgotten
for some reason:

http://lkml.org/lkml/2006/5/4/44

I'll refresh that patch so we can make sure it works on all platforms.

Regards,

Tony

  reply	other threads:[~2007-02-10 17:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09 11:24 H4 boot with latest git kernel Trilok Soni
2007-02-09 16:51 ` Tony Lindgren
2007-02-09 21:47   ` [PATCH] - Fix MMC -- was " Woodruff, Richard
2007-02-10 17:41     ` Tony Lindgren [this message]
2007-02-10 19:08       ` tony
2007-02-19 16:04         ` Woodruff, Richard
2007-02-20  9:23           ` Tony Lindgren
2007-02-26  5:13             ` Kyungmin Park
2007-02-26 15:12             ` Anderson Briglia
2007-02-27 18:45           ` Carlos Aguiar
2007-02-27 18:50             ` Woodruff, Richard
2007-02-27 19:21               ` Anderson Briglia
2007-02-27 19:24                 ` Woodruff, Richard
2007-02-28 15:04                   ` Carlos Aguiar
2007-03-02 12:28                     ` Tony Lindgren

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=20070210174121.GA5291@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=r-woodruff2@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.