Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Jaehoon Chung <jh80.chung@samsung.com>, linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org
Subject: Re: [PATCH] mmc: sdhci: put together into one condition checking
Date: Tue, 11 Oct 2016 12:28:35 +0300	[thread overview]
Message-ID: <d06587f1-096f-1aaf-6a31-56eb9f2688aa@intel.com> (raw)
In-Reply-To: <1475816923-24532-1-git-send-email-jh80.chung@samsung.com>

On 07/10/16 08:08, Jaehoon Chung wrote:
> value of ios->timing is not related with SDCHI v3.0.
> If Controller version is v3.0, SDHCI_QUIRK_NO_HISPD_BIT is meaningless.
> To prevent the setting wrong bit moves into one codntion checking.

codntion -> condition

> (e.g sdhci-s3c doesn't use SDHCI_CTRL_HISPD bit, instead using this bit as
>  other purpose.)
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 4805566..f854c66 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1619,7 +1619,14 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  	ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
>  
>  	if ((ios->timing == MMC_TIMING_SD_HS ||
> -	     ios->timing == MMC_TIMING_MMC_HS)
> +	     ios->timing == MMC_TIMING_MMC_HS ||
> +	     ios->timing == MMC_TIMING_MMC_HS400 ||
> +	     ios->timing == MMC_TIMING_MMC_HS200 ||
> +	     ios->timing == MMC_TIMING_MMC_DDR52 ||
> +	     ios->timing == MMC_TIMING_UHS_SDR50 ||
> +	     ios->timing == MMC_TIMING_UHS_SDR104 ||
> +	     ios->timing == MMC_TIMING_UHS_DDR50 ||
> +	     ios->timing == MMC_TIMING_UHS_SDR25)
>  	    && !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT))
>  		ctrl |= SDHCI_CTRL_HISPD;
>  	else
> @@ -1628,16 +1635,6 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  	if (host->version >= SDHCI_SPEC_300) {
>  		u16 clk, ctrl_2;
>  
> -		/* In case of UHS-I modes, set High Speed Enable */
> -		if ((ios->timing == MMC_TIMING_MMC_HS400) ||
> -		    (ios->timing == MMC_TIMING_MMC_HS200) ||
> -		    (ios->timing == MMC_TIMING_MMC_DDR52) ||
> -		    (ios->timing == MMC_TIMING_UHS_SDR50) ||
> -		    (ios->timing == MMC_TIMING_UHS_SDR104) ||
> -		    (ios->timing == MMC_TIMING_UHS_DDR50) ||
> -		    (ios->timing == MMC_TIMING_UHS_SDR25))
> -			ctrl |= SDHCI_CTRL_HISPD;
> -
>  		if (!host->preset_enabled) {
>  			sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
>  			/*
> 


  reply	other threads:[~2016-10-11  9:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07  5:08 [PATCH] mmc: sdhci: put together into one condition checking Jaehoon Chung
2016-10-11  9:28 ` Adrian Hunter [this message]
2016-10-17 13:49 ` Ulf Hansson

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=d06587f1-096f-1aaf-6a31-56eb9f2688aa@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox