mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: Faiz Abbas <faiz_abbas@ti.com>,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Cc: shawn.lin@rock-chips.com, ulf.hansson@linaro.org,
	adrian.hunter@intel.com
Subject: Re: [RFT PATCH 3/3] mmc: sdhci-of-arasan: Fix Command Queuing enable handling
Date: Fri, 3 Jan 2020 08:36:55 +0800	[thread overview]
Message-ID: <5a7f96e5-58f0-083e-612f-7f5867d8eb66@rock-chips.com> (raw)
In-Reply-To: <20191230092343.30692-4-faiz_abbas@ti.com>


On 2019/12/30 17:23, Faiz Abbas wrote:
> There is a need to dump data from the buffer before enabling command
> queuing because of leftover data from tuning. Reset the data lines to
> fix this at the source.
> 

It seems to work for my platform by porting it to 4.19 LTS.

Tested-by: Shawn Lin <shawn.lin@rock-chips.com>

> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> ---
>   drivers/mmc/host/sdhci-of-arasan.c | 21 ++++-----------------
>   1 file changed, 4 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index e49b44b4d82e..1495ae72b902 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -376,22 +376,8 @@ static void sdhci_arasan_dumpregs(struct mmc_host *mmc)
>   	sdhci_dumpregs(mmc_priv(mmc));
>   }
>   
> -static void sdhci_arasan_cqe_enable(struct mmc_host *mmc)
> -{
> -	struct sdhci_host *host = mmc_priv(mmc);
> -	u32 reg;
> -
> -	reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
> -	while (reg & SDHCI_DATA_AVAILABLE) {
> -		sdhci_readl(host, SDHCI_BUFFER);
> -		reg = sdhci_readl(host, SDHCI_PRESENT_STATE);
> -	}
> -
> -	sdhci_cqe_enable(mmc);
> -}
> -
>   static const struct cqhci_host_ops sdhci_arasan_cqhci_ops = {
> -	.enable         = sdhci_arasan_cqe_enable,
> +	.enable         = sdhci_cqe_enable,
>   	.disable        = sdhci_cqe_disable,
>   	.dumpregs       = sdhci_arasan_dumpregs,
>   };
> @@ -410,8 +396,9 @@ static const struct sdhci_ops sdhci_arasan_cqe_ops = {
>   static const struct sdhci_pltfm_data sdhci_arasan_cqe_pdata = {
>   	.ops = &sdhci_arasan_cqe_ops,
>   	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> -	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> +	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN	|
> +		   SDHCI_QUIRK2_RESET_DATA_POST_TUNING	|
> +		   SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
>   };
>   
>   static struct sdhci_arasan_of_data sdhci_arasan_rk3399_data = {
> 



  reply	other threads:[~2020-01-03  0:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30  9:23 [PATCH 0/3] Fix issues with command queuing in arasan controllers Faiz Abbas
2019-12-30  9:23 ` [PATCH 1/3] mmc: sdhci: Add Quirk to reset data lines after tuning Faiz Abbas
2019-12-30  9:23 ` [PATCH 2/3] mmc: sdhci_am654: Enable Quirk to reset data " Faiz Abbas
2019-12-30  9:23 ` [RFT PATCH 3/3] mmc: sdhci-of-arasan: Fix Command Queuing enable handling Faiz Abbas
2020-01-03  0:36   ` Shawn Lin [this message]
2020-01-08 11:30 ` [PATCH 0/3] Fix issues with command queuing in arasan controllers Faiz Abbas
2020-01-08 11:42   ` Adrian Hunter
2020-01-08 11:49     ` Faiz Abbas
2020-01-08 11:59       ` Adrian Hunter
2020-01-08 12:04         ` Faiz Abbas

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=5a7f96e5-58f0-083e-612f-7f5867d8eb66@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=adrian.hunter@intel.com \
    --cc=faiz_abbas@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®