[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5a7f96e5-58f0-083e-612f-7f5867d8eb66@rock-chips.com>
Date: Fri, 3 Jan 2020 08:36:55 +0800
From: Shawn Lin <shawn.lin@...k-chips.com>
To: Faiz Abbas <faiz_abbas@...com>, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org
Cc: shawn.lin@...k-chips.com, ulf.hansson@...aro.org,
adrian.hunter@...el.com
Subject: Re: [RFT PATCH 3/3] mmc: sdhci-of-arasan: Fix Command Queuing enable
handling
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@...k-chips.com>
> Signed-off-by: Faiz Abbas <faiz_abbas@...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 = {
>
Powered by blists - more mailing lists