All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV
@ 2016-08-15  8:19 Haibo Chen
  2016-08-16  7:30 ` Dong Aisheng
  2016-08-22 13:40 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Haibo Chen @ 2016-08-15  8:19 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson, aisheng.dong, linux-mmc; +Cc: haibo.chen

Now, when call esdhc_set_timeout() to set the data timeout counter value,
IPP_RST_N(bit 23) is wrongly affected. This patch add a mask to avoid this.

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

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 99e0b33..437c448 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -31,6 +31,7 @@
 #include "sdhci-pltfm.h"
 #include "sdhci-esdhc.h"
 
+#define ESDHC_SYS_CTRL_DTOCV_MASK	0x0f
 #define	ESDHC_CTRL_D3CD			0x08
 #define ESDHC_BURST_LEN_EN_INCR		(1 << 27)
 /* VENDOR SPEC register */
@@ -937,7 +938,8 @@ static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
 	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
 
 	/* use maximum timeout counter */
-	sdhci_writeb(host, esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
+	esdhc_clrset_le(host, ESDHC_SYS_CTRL_DTOCV_MASK,
+			esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
 			SDHCI_TIMEOUT_CONTROL);
 }
 
-- 
1.9.1


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

* Re: [PATCH] mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV
  2016-08-15  8:19 [PATCH] mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV Haibo Chen
@ 2016-08-16  7:30 ` Dong Aisheng
  2016-08-18 12:49   ` Adrian Hunter
  2016-08-22 13:40 ` Ulf Hansson
  1 sibling, 1 reply; 4+ messages in thread
From: Dong Aisheng @ 2016-08-16  7:30 UTC (permalink / raw)
  To: Haibo Chen; +Cc: adrian.hunter, ulf.hansson, aisheng.dong, linux-mmc

On Mon, Aug 15, 2016 at 04:19:38PM +0800, Haibo Chen wrote:
> Now, when call esdhc_set_timeout() to set the data timeout counter value,
> IPP_RST_N(bit 23) is wrongly affected. This patch add a mask to avoid this.
> 
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

Acked-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Dong Aisheng

> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 99e0b33..437c448 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -31,6 +31,7 @@
>  #include "sdhci-pltfm.h"
>  #include "sdhci-esdhc.h"
>  
> +#define ESDHC_SYS_CTRL_DTOCV_MASK	0x0f
>  #define	ESDHC_CTRL_D3CD			0x08
>  #define ESDHC_BURST_LEN_EN_INCR		(1 << 27)
>  /* VENDOR SPEC register */
> @@ -937,7 +938,8 @@ static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
>  	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
>  
>  	/* use maximum timeout counter */
> -	sdhci_writeb(host, esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
> +	esdhc_clrset_le(host, ESDHC_SYS_CTRL_DTOCV_MASK,
> +			esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
>  			SDHCI_TIMEOUT_CONTROL);
>  }
>  
> -- 
> 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: do not touch other bit when config DTOCV
  2016-08-16  7:30 ` Dong Aisheng
@ 2016-08-18 12:49   ` Adrian Hunter
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2016-08-18 12:49 UTC (permalink / raw)
  To: Dong Aisheng, Haibo Chen; +Cc: ulf.hansson, aisheng.dong, linux-mmc

On 16/08/16 10:30, Dong Aisheng wrote:
> On Mon, Aug 15, 2016 at 04:19:38PM +0800, Haibo Chen wrote:
>> Now, when call esdhc_set_timeout() to set the data timeout counter value,
>> IPP_RST_N(bit 23) is wrongly affected. This patch add a mask to avoid this.
>>
>> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> 
> Acked-by: Dong Aisheng <aisheng.dong@nxp.com>

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

> 
> Regards
> Dong Aisheng
> 
>> ---
>>  drivers/mmc/host/sdhci-esdhc-imx.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> index 99e0b33..437c448 100644
>> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> @@ -31,6 +31,7 @@
>>  #include "sdhci-pltfm.h"
>>  #include "sdhci-esdhc.h"
>>  
>> +#define ESDHC_SYS_CTRL_DTOCV_MASK	0x0f
>>  #define	ESDHC_CTRL_D3CD			0x08
>>  #define ESDHC_BURST_LEN_EN_INCR		(1 << 27)
>>  /* VENDOR SPEC register */
>> @@ -937,7 +938,8 @@ static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
>>  	struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
>>  
>>  	/* use maximum timeout counter */
>> -	sdhci_writeb(host, esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
>> +	esdhc_clrset_le(host, ESDHC_SYS_CTRL_DTOCV_MASK,
>> +			esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
>>  			SDHCI_TIMEOUT_CONTROL);
>>  }
>>  
>> -- 
>> 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: do not touch other bit when config DTOCV
  2016-08-15  8:19 [PATCH] mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV Haibo Chen
  2016-08-16  7:30 ` 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:19, Haibo Chen <haibo.chen@nxp.com> wrote:
> Now, when call esdhc_set_timeout() to set the data timeout counter value,
> IPP_RST_N(bit 23) is wrongly affected. This patch add a mask to avoid this.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>'

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 99e0b33..437c448 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -31,6 +31,7 @@
>  #include "sdhci-pltfm.h"
>  #include "sdhci-esdhc.h"
>
> +#define ESDHC_SYS_CTRL_DTOCV_MASK      0x0f
>  #define        ESDHC_CTRL_D3CD                 0x08
>  #define ESDHC_BURST_LEN_EN_INCR                (1 << 27)
>  /* VENDOR SPEC register */
> @@ -937,7 +938,8 @@ static void esdhc_set_timeout(struct sdhci_host *host, struct mmc_command *cmd)
>         struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host);
>
>         /* use maximum timeout counter */
> -       sdhci_writeb(host, esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
> +       esdhc_clrset_le(host, ESDHC_SYS_CTRL_DTOCV_MASK,
> +                       esdhc_is_usdhc(imx_data) ? 0xF : 0xE,
>                         SDHCI_TIMEOUT_CONTROL);
>  }
>
> --
> 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:19 [PATCH] mmc: sdhci-esdhc-imx: do not touch other bit when config DTOCV Haibo Chen
2016-08-16  7:30 ` Dong Aisheng
2016-08-18 12:49   ` Adrian Hunter
2016-08-22 13:40 ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.