Skip to contentSkip to conversation

mmc: sdhci-esdhc-imx: correct the max timeout count

PATCH Applied Haibo Chen 4 participants 4 messages Aug 16, 2016 – Aug 22, 2016

Subsystems (4)
lore
Share & tools
lore

Haibo Chen

author maintainer
#0 lore raw

PATCH 1/1 mmc: sdhci-esdhc-imx: correct the max timeout count

i.MX USDHC Reference Manual has a mistake, for the register SYS_CTRL, the DTOCV(bit 19~16) means the data timeout counter value. When DTOCV is set to 0xF, it means SDCLK << 29, not SDCLK << 28.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
index 437c448..ea7d086 100644
@@ -929,7 +929,7 @@ static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host)
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
 
-	return esdhc_is_usdhc(imx_data) ? 1 << 28 : 1 << 27;
+	return esdhc_is_usdhc(imx_data) ? 1 << 29 : 1 << 27;
 }
 
 static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Haibo Chen

i.MX USDHC Reference Manual has a mistake, for the register SYS_CTRL, the DTOCV(bit 19~16) means the data timeout counter value. When DTOCV is set to 0xF, it means SDCLK << 29, not SDCLK << 28.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
index 437c448..ea7d086 100644

drivers/mmc/host/sdhci-esdhc-imx.c static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host) · line 931

Quoted 3 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
@@ -929,7 +929,7 @@ static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host)
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
 

Better add a comment here like:

	/* Doc Errata: the uSDHC actual maximum timeout count is 1 << 29 */

drivers/mmc/host/sdhci-esdhc-imx.c static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host) · line 932

Quoted 2 lines
drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
-	return esdhc_is_usdhc(imx_data) ? 1 << 28 : 1 << 27;
+	return esdhc_is_usdhc(imx_data) ? 1 << 29 : 1 << 27;

Otherwise:

Regards
Dong Aisheng

Quoted 10 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
 }
 
 static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by
#2 lore raw
Quoted 20 lines · Dong Aisheng
Quoted 14 lines · Haibo Chen

i.MX USDHC Reference Manual has a mistake, for the register SYS_CTRL, the DTOCV(bit 19~16) means the data timeout counter value. When DTOCV is set to 0xF, it means SDCLK << 29, not SDCLK << 28.

---
 drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
index 437c448..ea7d086 100644

drivers/mmc/host/sdhci-esdhc-imx.c static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host) · line 931

Quoted 3 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
@@ -929,7 +929,7 @@ static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host)
 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
 	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
 

Better add a comment here like:

Quoted 7 lines
	/* Doc Errata: the uSDHC actual maximum timeout count is 1 << 29 */

drivers/mmc/host/sdhci-esdhc-imx.c static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host) · line 932

Quoted 2 lines
drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
-	return esdhc_is_usdhc(imx_data) ? 1 << 28 : 1 << 27;
+	return esdhc_is_usdhc(imx_data) ? 1 << 29 : 1 << 27;

Otherwise:

Please take account of Dong's comment, otherwise:

Quoted 15 lines

Regards
Dong Aisheng

Quoted 10 lines
drivers/mmc/host/sdhci-esdhc-imx.c +0 -0
 }
 
 static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#3 lore raw
In reply to Haibo Chen
Quoted 5 lines · Haibo Chen

i.MX USDHC Reference Manual has a mistake, for the register SYS_CTRL, the DTOCV(bit 19~16) means the data timeout counter value. When DTOCV is set to 0xF, it means SDCLK << 29, not SDCLK << 28.

Thanks, applied for next - and by adding the comment as proposed by Dong.

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-esdhc-imx.c +1 -2
index 437c448..ea7d086 100644
@@ -929,7 +929,7 @@ static unsigned int esdhc_get_max_timeout_count(struct sdhci_host *host)
        struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
        struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
 
-       return esdhc_is_usdhc(imx_data) ? 1 << 28 : 1 << 27;
+       return esdhc_is_usdhc(imx_data) ? 1 << 29 : 1 << 27;
 }
 
 static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
--

1.9.1