public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count
@ 2016-08-15  8:31 Haibo Chen
  2016-08-16  7:44 ` Dong Aisheng
  2016-08-22 13:40 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Haibo Chen @ 2016-08-15  8:31 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson, aisheng.dong, linux-mmc; +Cc: 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.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 437c448..ea7d086 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count
  2016-08-15  8:31 [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count Haibo Chen
@ 2016-08-16  7:44 ` Dong Aisheng
  2016-08-18 12:55   ` Adrian Hunter
  2016-08-22 13:40 ` Ulf Hansson
  1 sibling, 1 reply; 4+ messages in thread
From: Dong Aisheng @ 2016-08-16  7:44 UTC (permalink / raw)
  To: Haibo Chen; +Cc: adrian.hunter, ulf.hansson, aisheng.dong, linux-mmc

On Mon, Aug 15, 2016 at 04:31:33PM +0800, Haibo Chen wrote:
> 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.
> 
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 437c448..ea7d086 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -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 */

> -	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 <aisheng.dong@nxp.com>

Regards
Dong Aisheng

>  }
>  
>  static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count
  2016-08-16  7:44 ` Dong Aisheng
@ 2016-08-18 12:55   ` Adrian Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2016-08-18 12:55 UTC (permalink / raw)
  To: Dong Aisheng, Haibo Chen; +Cc: ulf.hansson, aisheng.dong, linux-mmc

On 16/08/16 10:44, Dong Aisheng wrote:
> On Mon, Aug 15, 2016 at 04:31:33PM +0800, Haibo Chen wrote:
>> 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.
>>
>> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
>> ---
>>  drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> index 437c448..ea7d086 100644
>> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> @@ -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 */
> 
>> -	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 <aisheng.dong@nxp.com>

Please take account of Dong's comment, otherwise:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> 
> Regards
> Dong Aisheng
> 
>>  }
>>  
>>  static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
>> -- 
>> 1.9.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count
  2016-08-15  8:31 [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count Haibo Chen
  2016-08-16  7:44 ` Dong Aisheng
@ 2016-08-22 13:40 ` Ulf Hansson
  1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2016-08-22 13:40 UTC (permalink / raw)
  To: Haibo Chen; +Cc: Adrian Hunter, Aisheng Dong, linux-mmc

On 15 August 2016 at 10:31, Haibo Chen <haibo.chen@nxp.com> wrote:
> 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.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

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

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 437c448..ea7d086 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-22 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15  8:31 [PATCH] mmc: sdhci-esdhc-imx: correct the max timeout count Haibo Chen
2016-08-16  7:44 ` Dong Aisheng
2016-08-18 12:55   ` Adrian Hunter
2016-08-22 13:40 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox