public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Hein_Tibosch <hein_tibosch@yahoo.es>
To: r66093@freescale.com
Cc: linux-mmc@vger.kernel.org,
	Jerry Huang <Chang-Ming.Huang@freescale.com>,
	Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on()
Date: Tue, 06 Dec 2011 20:13:14 +0800	[thread overview]
Message-ID: <4EDE06DA.7010108@yahoo.es> (raw)
In-Reply-To: <1323163107-32619-2-git-send-email-r66093@freescale.com>

Hi Jerry,

On 12/6/2011 5:18 PM, r66093@freescale.com wrote:
> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
>
> When f_init is zero, the SDHC can't work correctly. So f_min will replace
> f_init, when f_init is zero.
>
> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> CC: Chris Ball <cjb@laptop.org>
> ---
> changes for v2:
> 	- add the CC
>
>  drivers/mmc/core/core.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index a08e6b1..2d40c04 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1253,7 +1253,10 @@ static void mmc_power_up(struct mmc_host *host)
>  	 */
>  	mmc_delay(10);
>  
> -	host->ios.clock = host->f_init;
> +	if (host->f_init)
> +		host->ios.clock = host->f_init;
> +	else
> +		host->ios.clock = host->f_min;

Are you sure f_min can have a value of zero?
It should have been set mmc_rescan_try_freq(), when trying a list
of frequencies: 400000, 300000, 200000, 100000

>  
>  	host->ios.power_mode = MMC_POWER_ON;
>  	mmc_set_ios(host);

  reply	other threads:[~2011-12-06 12:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06  9:18 [PATCH 1/5 v2] MMC/core: Make sure the power is up, when detect the card r66093
2011-12-06  9:18 ` [PATCH 2/5 v2] MMC/core: Add f_min to mmc_power_on() r66093
2011-12-06 12:13   ` Hein_Tibosch [this message]
2011-12-06 12:18     ` Hein_Tibosch
2011-12-07  2:23     ` Huang Changming-R66093
2011-12-07  3:37       ` Hein_Tibosch
2011-12-07  7:45         ` Huang Changming-R66093
2011-12-06 12:12 ` [PATCH 1/5 v2] MMC/core: Make sure the power is up, when detect the card Hein_Tibosch
2011-12-07  2:26   ` Huang Changming-R66093

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=4EDE06DA.7010108@yahoo.es \
    --to=hein_tibosch@yahoo.es \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=r66093@freescale.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