[PATCH v2] mmc: sdhci_am654: Workaround for Errata i2312

Judith Mendez posted 1 patch 3 months, 1 week ago
drivers/mmc/host/sdhci_am654.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
[PATCH v2] mmc: sdhci_am654: Workaround for Errata i2312
Posted by Judith Mendez 3 months, 1 week ago
Errata i2312 [0] for K3 silicon mentions the maximum obtainable
timeout through MMC host controller is 700ms. And for commands taking
longer than 700ms, hardware timeout should be disabled and software
timeout should be used.

The workaround for Errata i2312 can be achieved by adding
SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk in sdhci_am654.

[0] https://www.ti.com/lit/pdf/sprz487

Signed-off-by: Judith Mendez <jm@ti.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
Changes since v1:
- Split series [v1] according to Vignesh's review comment in v1
- Add Adrian's tag

v1: https://lore.kernel.org/linux-mmc/20250624221230.1952291-1-jm@ti.com/
---
 drivers/mmc/host/sdhci_am654.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index ea14d56558c4..86d87d8e0675 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -613,7 +613,8 @@ static const struct sdhci_ops sdhci_am654_ops = {
 static const struct sdhci_pltfm_data sdhci_am654_pdata = {
 	.ops = &sdhci_am654_ops,
 	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
-	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
+	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
+		   SDHCI_QUIRK2_DISABLE_HW_TIMEOUT,
 };
 
 static const struct sdhci_am654_driver_data sdhci_am654_sr1_drvdata = {
@@ -643,7 +644,8 @@ static const struct sdhci_ops sdhci_j721e_8bit_ops = {
 static const struct sdhci_pltfm_data sdhci_j721e_8bit_pdata = {
 	.ops = &sdhci_j721e_8bit_ops,
 	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
-	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
+	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
+		   SDHCI_QUIRK2_DISABLE_HW_TIMEOUT,
 };
 
 static const struct sdhci_am654_driver_data sdhci_j721e_8bit_drvdata = {
@@ -667,7 +669,8 @@ static const struct sdhci_ops sdhci_j721e_4bit_ops = {
 static const struct sdhci_pltfm_data sdhci_j721e_4bit_pdata = {
 	.ops = &sdhci_j721e_4bit_ops,
 	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
-	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
+	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
+		   SDHCI_QUIRK2_DISABLE_HW_TIMEOUT,
 };
 
 static const struct sdhci_am654_driver_data sdhci_j721e_4bit_drvdata = {
-- 
2.49.0
Re: [PATCH v2] mmc: sdhci_am654: Workaround for Errata i2312
Posted by Ulf Hansson 3 months, 1 week ago
On Fri, 27 Jun 2025 at 01:14, Judith Mendez <jm@ti.com> wrote:
>
> Errata i2312 [0] for K3 silicon mentions the maximum obtainable
> timeout through MMC host controller is 700ms. And for commands taking
> longer than 700ms, hardware timeout should be disabled and software
> timeout should be used.
>
> The workaround for Errata i2312 can be achieved by adding
> SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk in sdhci_am654.
>
> [0] https://www.ti.com/lit/pdf/sprz487
>
> Signed-off-by: Judith Mendez <jm@ti.com>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Applied for fixes and by adding a fixes and a stable tag, thanks!

Kind regards
Uffe


> ---
> Changes since v1:
> - Split series [v1] according to Vignesh's review comment in v1
> - Add Adrian's tag
>
> v1: https://lore.kernel.org/linux-mmc/20250624221230.1952291-1-jm@ti.com/
> ---
>  drivers/mmc/host/sdhci_am654.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index ea14d56558c4..86d87d8e0675 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -613,7 +613,8 @@ static const struct sdhci_ops sdhci_am654_ops = {
>  static const struct sdhci_pltfm_data sdhci_am654_pdata = {
>         .ops = &sdhci_am654_ops,
>         .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> -       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> +       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> +                  SDHCI_QUIRK2_DISABLE_HW_TIMEOUT,
>  };
>
>  static const struct sdhci_am654_driver_data sdhci_am654_sr1_drvdata = {
> @@ -643,7 +644,8 @@ static const struct sdhci_ops sdhci_j721e_8bit_ops = {
>  static const struct sdhci_pltfm_data sdhci_j721e_8bit_pdata = {
>         .ops = &sdhci_j721e_8bit_ops,
>         .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> -       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> +       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> +                  SDHCI_QUIRK2_DISABLE_HW_TIMEOUT,
>  };
>
>  static const struct sdhci_am654_driver_data sdhci_j721e_8bit_drvdata = {
> @@ -667,7 +669,8 @@ static const struct sdhci_ops sdhci_j721e_4bit_ops = {
>  static const struct sdhci_pltfm_data sdhci_j721e_4bit_pdata = {
>         .ops = &sdhci_j721e_4bit_ops,
>         .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> -       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
> +       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> +                  SDHCI_QUIRK2_DISABLE_HW_TIMEOUT,
>  };
>
>  static const struct sdhci_am654_driver_data sdhci_j721e_4bit_drvdata = {
> --
> 2.49.0
>