linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	Pierre Ossman <drzeus-list@drzeus.cx>,
	Carlos Aguiar <carlos.aguiar@indt.org.br>
Subject: MMC: 2/2 Fix MMC_POWER_UP on some OMAP boards
Date: Thu, 4 May 2006 00:26:30 -0700	[thread overview]
Message-ID: <20060504072630.GF8664@atomide.com> (raw)
In-Reply-To: <20060504072439.GE8664@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: patch-omap-mmc-16xx-startup-clock --]
[-- Type: text/plain, Size: 784 bytes --]

MMC spec says that we must not enable clock prior to the power
stabilizing. But at least omap16xx needs clock divisor configured
during MMC_POWER_UP.

Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/drivers/mmc/omap.c
+++ b/drivers/mmc/omap.c
@@ -899,9 +899,16 @@ static void mmc_omap_set_ios(struct mmc_
 	int dsor;
 	int realclock, i;
 
-	realclock = ios->clock;
+	/* According to the MMC spec we must not enable clock prior to
+	 * power stabilizing. But at least omap16xx needs clock dsor
+	 * configured during MMC_POWER_UP.
+	 */
+	if ((ios->power_mode == MMC_POWER_UP) && (ios->clock == 0))
+		realclock = mmc->f_min;
+	else
+		realclock = ios->clock;
 
-	if (ios->clock == 0)
+	if (realclock == 0)
 		dsor = 0;
 	else {
 		int func_clk_rate = clk_get_rate(host->fclk);

  reply	other threads:[~2006-05-04  7:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-04  7:24 MMC: 1/2 Make OMAP MMC work Tony Lindgren
2006-05-04  7:26 ` Tony Lindgren [this message]
2006-05-04  7:54   ` MMC: 2/2 Fix MMC_POWER_UP on some OMAP boards Russell King
2006-05-04  9:31     ` 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=20060504072630.GF8664@atomide.com \
    --to=tony@atomide.com \
    --cc=carlos.aguiar@indt.org.br \
    --cc=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).