2020-08-06 00:35:53

by Sowjanya Komatineni

[permalink] [raw]
Subject: [PATCH v3 0/6] Fix timeout clock used by hardware data timeout

Tegra210/Tegra186/Tegra194 has incorrectly enabled
SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK from the beginning of their support.

Tegra210 and later SDMMC hardware default uses sdmmc_legacy_tm (TMCLK)
all the time for hardware data timeout instead of SDCLK and this TMCLK
need to be kept enabled by Tegra sdmmc driver.

This series includes patches to fix this for Tegra210/Tegra186/Tegra194.

These patches need to be manually backported for 4.9, 4.14 and 4.19.

Will send patches to backport separately once these patches are ack'd.

Delta between patch versions:
[v3]: Same as v2 with fixes tag

[v2]: Includes minor fix
- Patch-0006: parentheses around operand of '!'

Sowjanya Komatineni (6):
sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra210
sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra186
arm64: tegra: Add missing timeout clock to Tegra210 SDMMC
arm64: tegra: Add missing timeout clock to Tegra186 SDMMC nodes
arm64: tegra: Add missing timeout clock to Tegra194 SDMMC nodes
sdhci: tegra: Add missing TMCLK for data timeout

arch/arm64/boot/dts/nvidia/tegra186.dtsi | 20 +++++++++------
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 15 ++++++-----
arch/arm64/boot/dts/nvidia/tegra210.dtsi | 20 +++++++++------
drivers/mmc/host/sdhci-tegra.c | 43 ++++++++++++++++++++++++++++++--
4 files changed, 74 insertions(+), 24 deletions(-)

--
2.7.4


2020-08-06 00:36:01

by Sowjanya Komatineni

[permalink] [raw]
Subject: [PATCH v3 2/6] sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra186

commit 4346b7c7941d ("mmc: tegra: Add Tegra186 support")

SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK is set for Tegra186 from the
beginning of its support in driver.

Tegra186 SDMMC hardware by default uses timeout clock (TMCLK) instead
of SDCLK and this quirk should not be set.

So, this patch remove this quirk for Tegra186.

Fixes: 4346b7c7941d ("mmc: tegra: Add Tegra186 support")
Cc: stable <[email protected]> # 5.4
Acked-by: Adrian Hunter <[email protected]>
Signed-off-by: Sowjanya Komatineni <[email protected]>
---
drivers/mmc/host/sdhci-tegra.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 2be3511..31ed321 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -1455,7 +1455,6 @@ static const struct sdhci_ops tegra186_sdhci_ops = {

static const struct sdhci_pltfm_data sdhci_tegra186_pdata = {
.quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
- SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
SDHCI_QUIRK_SINGLE_POWER_WRITE |
SDHCI_QUIRK_NO_HISPD_BIT |
SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC |
--
2.7.4

2020-08-21 07:42:49

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH v3 0/6] Fix timeout clock used by hardware data timeout

On Thu, 6 Aug 2020 at 02:32, Sowjanya Komatineni <[email protected]> wrote:
>
> Tegra210/Tegra186/Tegra194 has incorrectly enabled
> SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK from the beginning of their support.
>
> Tegra210 and later SDMMC hardware default uses sdmmc_legacy_tm (TMCLK)
> all the time for hardware data timeout instead of SDCLK and this TMCLK
> need to be kept enabled by Tegra sdmmc driver.
>
> This series includes patches to fix this for Tegra210/Tegra186/Tegra194.
>
> These patches need to be manually backported for 4.9, 4.14 and 4.19.
>
> Will send patches to backport separately once these patches are ack'd.
>
> Delta between patch versions:
> [v3]: Same as v2 with fixes tag
>
> [v2]: Includes minor fix
> - Patch-0006: parentheses around operand of '!'
>
> Sowjanya Komatineni (6):
> sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra210
> sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra186
> arm64: tegra: Add missing timeout clock to Tegra210 SDMMC
> arm64: tegra: Add missing timeout clock to Tegra186 SDMMC nodes
> arm64: tegra: Add missing timeout clock to Tegra194 SDMMC nodes
> sdhci: tegra: Add missing TMCLK for data timeout
>
> arch/arm64/boot/dts/nvidia/tegra186.dtsi | 20 +++++++++------
> arch/arm64/boot/dts/nvidia/tegra194.dtsi | 15 ++++++-----
> arch/arm64/boot/dts/nvidia/tegra210.dtsi | 20 +++++++++------
> drivers/mmc/host/sdhci-tegra.c | 43 ++++++++++++++++++++++++++++++--
> 4 files changed, 74 insertions(+), 24 deletions(-)
>
> --
> 2.7.4
>

This looks good to me.

If it helps, I can also pick the arm64 patches for my fixes branch,
but I need an ack from Thierry/Jon to do that.

Kind regards
Uffe