public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "ernest.zhang" <ernest.zhang@bayhubtech.com>,
	ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: yuxiang.wan@bayhubtech.com, xiaoguang.yu@bayhubtech.com,
	shirley.her@bayhubtech.com
Subject: Re: [PATCH 1/3] mmc: sdhci: fix SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD handling
Date: Tue, 9 Jan 2018 14:34:35 +0200	[thread overview]
Message-ID: <d92c4e02-577a-dcbf-87e5-2a40be006cc5@intel.com> (raw)
In-Reply-To: <20171228095913.3944-1-ernest.zhang@bayhubtech.com>

On 28/12/17 11:59, ernest.zhang wrote:
> SD controller with SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD quirk
> will clear SD host transfer mode register for non-data commands. But in
> eMMC HS200 hardware tuning case, the hardware tuning process need to
> transfer mode register has properly value. So don't clear transfer
> mode register when opcode equals to MMC_SEND_TUNING_BLOCK_HS200.

As I wrote last time, you send MMC_SEND_TUNING_BLOCK_HS200 with data != NULL
so this code path is not used.

Also please use version numbers in the subject.

> 
> Signed-off-by: ernest.zhang <ernest.zhang@bayhubtech.com>
> ---
>  drivers/mmc/host/sdhci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 0d5fcca18c9e..d5b19fc9ea56 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -918,7 +918,9 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
>  	if (data == NULL) {
>  		if (host->quirks2 &
>  			SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD) {
> -			sdhci_writew(host, 0x0, SDHCI_TRANSFER_MODE);
> +			/* cannot clear transfer mode register when tuning */
> +			if (cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200)
> +				sdhci_writew(host, 0x0, SDHCI_TRANSFER_MODE);
>  		} else {
>  		/* clear Auto CMD settings for no data CMDs */
>  			mode = sdhci_readw(host, SDHCI_TRANSFER_MODE);
> 

      reply	other threads:[~2018-01-09 12:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28  9:59 [PATCH 1/3] mmc: sdhci: fix SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD handling ernest.zhang
2018-01-09 12:34 ` Adrian Hunter [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=d92c4e02-577a-dcbf-87e5-2a40be006cc5@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=ernest.zhang@bayhubtech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shirley.her@bayhubtech.com \
    --cc=ulf.hansson@linaro.org \
    --cc=xiaoguang.yu@bayhubtech.com \
    --cc=yuxiang.wan@bayhubtech.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