All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@samsung.com>
To: Seungwon Jeon <tgih.jun@samsung.com>,
	linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org
Cc: 'Chris Ball' <chris@printf.net>,
	'Kukjin Kim' <kgene.kim@samsung.com>,
	'Ulf Hansson' <ulf.hansson@linaro.org>,
	'Alim Akhtar' <alim.akhtar@samsung.com>
Subject: Re: [PATCH v2 2/7] mmc: dw_mmc: exynos: don't use if clock isn't available
Date: Mon, 14 Apr 2014 16:30:45 +0900	[thread overview]
Message-ID: <534B8EA5.8070906@samsung.com> (raw)
In-Reply-To: <000201cf48e6$e05f8cb0$a11ea610$%jun@samsung.com>

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

On 03/26/2014 08:31 PM, Seungwon Jeon wrote:
> Add checking whether the clock is valid.
> 
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
> ---
>  drivers/mmc/host/dw_mmc-exynos.c |   11 +++++++----
>  1 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
> index a67e784..a2d06c5 100644
> --- a/drivers/mmc/host/dw_mmc-exynos.c
> +++ b/drivers/mmc/host/dw_mmc-exynos.c
> @@ -117,9 +117,9 @@ static int dw_mci_exynos_priv_init(struct dw_mci *host)
>  static int dw_mci_exynos_setup_clock(struct dw_mci *host)
>  {
>  	struct dw_mci_exynos_priv_data *priv = host->priv;
> -	unsigned long rate = clk_get_rate(host->ciu_clk);
>  
> -	host->bus_hz = rate / (priv->ciu_div + 1);
> +	host->bus_hz /= (priv->ciu_div + 1);
> +
>  	return 0;
>  }
>  
> @@ -196,8 +196,11 @@ static void dw_mci_exynos_set_ios(struct dw_mci *host, struct mmc_ios *ios)
>  		mci_writel(host, CLKSEL, priv->sdr_timing);
>  	}
>  
> -	/* Don't care if wanted clock is zero */
> -	if (!wanted)
> +	/*
> +	 * Don't care if wanted clock is zero or
> +	 * ciu clock is unavailable
> +	 */
> +	if (!wanted || IS_ERR(host->ciu_clk))
>  		return;
>  
>  	/* Guaranteed minimum frequency for cclkin */
> 


      reply	other threads:[~2014-04-14  7:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 11:31 [PATCH v2 2/7] mmc: dw_mmc: exynos: don't use if clock isn't available Seungwon Jeon
2014-04-14  7:30 ` Jaehoon Chung [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=534B8EA5.8070906@samsung.com \
    --to=jh80.chung@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=chris@printf.net \
    --cc=kgene.kim@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=tgih.jun@samsung.com \
    --cc=ulf.hansson@linaro.org \
    /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.