public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: sdhci: assigned to current clock value for host->clock
Date: Thu, 29 Oct 2015 17:40:23 +0900	[thread overview]
Message-ID: <5631DB77.1020500@samsung.com> (raw)
In-Reply-To: <1446105182-28901-1-git-send-email-jh80.chung@samsung.com>

Hi!

On 29/10/15 16:53, Jaehoon Chung wrote:
> There is no place where host->clock is assgined to any value.
> If real clock is changed to mmc->clock, host->clock can be assigned to
> mmc->clock. If card request to same clock value, it doesn't need to
> call sdhci_set_clock() function.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/mmc/sdhci.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index d89e302..3f87a23 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -380,8 +380,10 @@ static void sdhci_set_ios(struct mmc *mmc)
>  	if (host->set_control_reg)
>  		host->set_control_reg(host);
>  
> -	if (mmc->clock != host->clock)
> -		sdhci_set_clock(mmc, mmc->clock);
> +	if (mmc->clock != host->clock) {
> +		if (!sdhci_set_clock(mmc, mmc->clock))
> +			host->clock = mmc->clock;

I think it's better to move into sdhci_set_clock function.

> +	}
>  
>  	/* Set bus width */
>  	ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
> 

Thanks,
Minkyu Kang.

      reply	other threads:[~2015-10-29  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  7:53 [U-Boot] [PATCH] mmc: sdhci: assigned to current clock value for host->clock Jaehoon Chung
2015-10-29  8:40 ` Minkyu Kang [this message]

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=5631DB77.1020500@samsung.com \
    --to=mk7.kang@samsung.com \
    --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