mmc: sdhci-esdhc-imx: correct the max timeout count
Subsystems (4)
Haibo Chen
maintainerPATCH 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
@@ -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
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 to0xF, it means SDCLK << 29, not SDCLK << 28.Signed-off-by Haibo Chen <[email protected]>--- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/host/sdhci-esdhc-imx.c +0
-0
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
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 to0xF, it means SDCLK << 29, not SDCLK << 28.Signed-off-by Haibo Chen <[email protected]>--- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/host/sdhci-esdhc-imx.c +0
-0drivers/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:
Acked-by Dong Aisheng <[email protected]>
Please take account of Dong's comment, otherwise:
Quoted 15 lines
Regards
Dong AishengQuoted 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
Ulf Hansson
AppliedQuoted 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 to0xF, it means SDCLK << 29, not SDCLK << 28.Signed-off-by Haibo Chen <[email protected]>
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@@ -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