All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM
@ 2016-12-26  9:40 Yangbo Lu
  2017-01-12  1:32 ` Y.B. Lu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yangbo Lu @ 2016-12-26  9:40 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson, Adrian Hunter; +Cc: Yangbo Lu

Initially all QorIQ platforms were PowerPC architecture and they didn't
support card detection except several platforms. The driver added the
quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION as default and this made broken-cd
property in dts node didn't work. Now QorIQ platform turns to ARM
architecture and most of them could support card detection. However it's
a large number of dts trees that need to be fixed with broken-cd if we
remove the default SDHCI_QUIRK_BROKEN_CARD_DETECTION in driver. And the
users don't want to see this. So this patch is to remove this default
quirk just for ARM and keep it for PowerPC.(Note, QorIQ PowerPC platform
only has big-endian eSDHC while QorIQ ARM platform has big-endian or
little-endian eSDHC) This makes broken-cd property work again for ARM.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 drivers/mmc/host/sdhci-of-esdhc.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index 9a6eb44..364f6b8 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -569,16 +569,19 @@ static const struct sdhci_ops sdhci_esdhc_le_ops = {
 };
 
 static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
-		| SDHCI_QUIRK_NO_CARD_NO_RESET
-		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks = ESDHC_DEFAULT_QUIRKS |
+#ifdef CONFIG_PPC
+		  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
+#endif
+		  SDHCI_QUIRK_NO_CARD_NO_RESET |
+		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.ops = &sdhci_esdhc_be_ops,
 };
 
 static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = {
-	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
-		| SDHCI_QUIRK_NO_CARD_NO_RESET
-		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+	.quirks = ESDHC_DEFAULT_QUIRKS |
+		  SDHCI_QUIRK_NO_CARD_NO_RESET |
+		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
 	.ops = &sdhci_esdhc_le_ops,
 };
 
@@ -643,8 +646,7 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
 	    of_device_is_compatible(np, "fsl,p5020-esdhc") ||
 	    of_device_is_compatible(np, "fsl,p4080-esdhc") ||
 	    of_device_is_compatible(np, "fsl,p1020-esdhc") ||
-	    of_device_is_compatible(np, "fsl,t1040-esdhc") ||
-	    of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
+	    of_device_is_compatible(np, "fsl,t1040-esdhc"))
 		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
 
 	if (of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
-- 
2.1.0.27.g96db324


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

* RE: [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM
  2016-12-26  9:40 [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM Yangbo Lu
@ 2017-01-12  1:32 ` Y.B. Lu
  2017-01-12  7:15 ` Adrian Hunter
  2017-01-12 10:59 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Y.B. Lu @ 2017-01-12  1:32 UTC (permalink / raw)
  To: linux-mmc, ulf.hansson, Adrian Hunter

Hi Adrian and Uffe,

Any comments on this patch?
Thanks :)


Best regards,
Yangbo Lu

> -----Original Message-----
> From: Yangbo Lu [mailto:yangbo.lu@nxp.com]
> Sent: Monday, December 26, 2016 5:41 PM
> To: linux-mmc@vger.kernel.org; ulf.hansson@linaro.org; Adrian Hunter
> Cc: Y.B. Lu
> Subject: [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM
> 
> Initially all QorIQ platforms were PowerPC architecture and they didn't
> support card detection except several platforms. The driver added the
> quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION as default and this made broken-
> cd property in dts node didn't work. Now QorIQ platform turns to ARM
> architecture and most of them could support card detection. However it's
> a large number of dts trees that need to be fixed with broken-cd if we
> remove the default SDHCI_QUIRK_BROKEN_CARD_DETECTION in driver. And the
> users don't want to see this. So this patch is to remove this default
> quirk just for ARM and keep it for PowerPC.(Note, QorIQ PowerPC platform
> only has big-endian eSDHC while QorIQ ARM platform has big-endian or
> little-endian eSDHC) This makes broken-cd property work again for ARM.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
>  drivers/mmc/host/sdhci-of-esdhc.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-
> of-esdhc.c
> index 9a6eb44..364f6b8 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -569,16 +569,19 @@ static const struct sdhci_ops sdhci_esdhc_le_ops =
> {  };
> 
>  static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = {
> -	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> -		| SDHCI_QUIRK_NO_CARD_NO_RESET
> -		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> +	.quirks = ESDHC_DEFAULT_QUIRKS |
> +#ifdef CONFIG_PPC
> +		  SDHCI_QUIRK_BROKEN_CARD_DETECTION | #endif
> +		  SDHCI_QUIRK_NO_CARD_NO_RESET |
> +		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>  	.ops = &sdhci_esdhc_be_ops,
>  };
> 
>  static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = {
> -	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> -		| SDHCI_QUIRK_NO_CARD_NO_RESET
> -		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> +	.quirks = ESDHC_DEFAULT_QUIRKS |
> +		  SDHCI_QUIRK_NO_CARD_NO_RESET |
> +		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>  	.ops = &sdhci_esdhc_le_ops,
>  };
> 
> @@ -643,8 +646,7 @@ static int sdhci_esdhc_probe(struct platform_device
> *pdev)
>  	    of_device_is_compatible(np, "fsl,p5020-esdhc") ||
>  	    of_device_is_compatible(np, "fsl,p4080-esdhc") ||
>  	    of_device_is_compatible(np, "fsl,p1020-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,t1040-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
> +	    of_device_is_compatible(np, "fsl,t1040-esdhc"))
>  		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
> 
>  	if (of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
> --
> 2.1.0.27.g96db324


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

* Re: [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM
  2016-12-26  9:40 [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM Yangbo Lu
  2017-01-12  1:32 ` Y.B. Lu
@ 2017-01-12  7:15 ` Adrian Hunter
  2017-01-12 10:59 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2017-01-12  7:15 UTC (permalink / raw)
  To: Yangbo Lu, linux-mmc, ulf.hansson

On 26/12/16 11:40, Yangbo Lu wrote:
> Initially all QorIQ platforms were PowerPC architecture and they didn't
> support card detection except several platforms. The driver added the
> quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION as default and this made broken-cd
> property in dts node didn't work. Now QorIQ platform turns to ARM
> architecture and most of them could support card detection. However it's
> a large number of dts trees that need to be fixed with broken-cd if we
> remove the default SDHCI_QUIRK_BROKEN_CARD_DETECTION in driver. And the
> users don't want to see this. So this patch is to remove this default
> quirk just for ARM and keep it for PowerPC.(Note, QorIQ PowerPC platform
> only has big-endian eSDHC while QorIQ ARM platform has big-endian or
> little-endian eSDHC) This makes broken-cd property work again for ARM.
> 
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

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

> ---
>  drivers/mmc/host/sdhci-of-esdhc.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index 9a6eb44..364f6b8 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -569,16 +569,19 @@ static const struct sdhci_ops sdhci_esdhc_le_ops = {
>  };
>  
>  static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = {
> -	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> -		| SDHCI_QUIRK_NO_CARD_NO_RESET
> -		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> +	.quirks = ESDHC_DEFAULT_QUIRKS |
> +#ifdef CONFIG_PPC
> +		  SDHCI_QUIRK_BROKEN_CARD_DETECTION |
> +#endif
> +		  SDHCI_QUIRK_NO_CARD_NO_RESET |
> +		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>  	.ops = &sdhci_esdhc_be_ops,
>  };
>  
>  static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = {
> -	.quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> -		| SDHCI_QUIRK_NO_CARD_NO_RESET
> -		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> +	.quirks = ESDHC_DEFAULT_QUIRKS |
> +		  SDHCI_QUIRK_NO_CARD_NO_RESET |
> +		  SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>  	.ops = &sdhci_esdhc_le_ops,
>  };
>  
> @@ -643,8 +646,7 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
>  	    of_device_is_compatible(np, "fsl,p5020-esdhc") ||
>  	    of_device_is_compatible(np, "fsl,p4080-esdhc") ||
>  	    of_device_is_compatible(np, "fsl,p1020-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,t1040-esdhc") ||
> -	    of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
> +	    of_device_is_compatible(np, "fsl,t1040-esdhc"))
>  		host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>  
>  	if (of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
> 


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

* Re: [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM
  2016-12-26  9:40 [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM Yangbo Lu
  2017-01-12  1:32 ` Y.B. Lu
  2017-01-12  7:15 ` Adrian Hunter
@ 2017-01-12 10:59 ` Ulf Hansson
  2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2017-01-12 10:59 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: linux-mmc, Adrian Hunter

On 26 December 2016 at 10:40, Yangbo Lu <yangbo.lu@nxp.com> wrote:
> Initially all QorIQ platforms were PowerPC architecture and they didn't
> support card detection except several platforms. The driver added the
> quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION as default and this made broken-cd
> property in dts node didn't work. Now QorIQ platform turns to ARM
> architecture and most of them could support card detection. However it's
> a large number of dts trees that need to be fixed with broken-cd if we
> remove the default SDHCI_QUIRK_BROKEN_CARD_DETECTION in driver. And the
> users don't want to see this. So this patch is to remove this default
> quirk just for ARM and keep it for PowerPC.(Note, QorIQ PowerPC platform
> only has big-endian eSDHC while QorIQ ARM platform has big-endian or
> little-endian eSDHC) This makes broken-cd property work again for ARM.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Thanks, applied for next!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-of-esdhc.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
> index 9a6eb44..364f6b8 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -569,16 +569,19 @@ static const struct sdhci_ops sdhci_esdhc_le_ops = {
>  };
>
>  static const struct sdhci_pltfm_data sdhci_esdhc_be_pdata = {
> -       .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> -               | SDHCI_QUIRK_NO_CARD_NO_RESET
> -               | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> +       .quirks = ESDHC_DEFAULT_QUIRKS |
> +#ifdef CONFIG_PPC
> +                 SDHCI_QUIRK_BROKEN_CARD_DETECTION |
> +#endif
> +                 SDHCI_QUIRK_NO_CARD_NO_RESET |
> +                 SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>         .ops = &sdhci_esdhc_be_ops,
>  };
>
>  static const struct sdhci_pltfm_data sdhci_esdhc_le_pdata = {
> -       .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION
> -               | SDHCI_QUIRK_NO_CARD_NO_RESET
> -               | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
> +       .quirks = ESDHC_DEFAULT_QUIRKS |
> +                 SDHCI_QUIRK_NO_CARD_NO_RESET |
> +                 SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
>         .ops = &sdhci_esdhc_le_ops,
>  };
>
> @@ -643,8 +646,7 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
>             of_device_is_compatible(np, "fsl,p5020-esdhc") ||
>             of_device_is_compatible(np, "fsl,p4080-esdhc") ||
>             of_device_is_compatible(np, "fsl,p1020-esdhc") ||
> -           of_device_is_compatible(np, "fsl,t1040-esdhc") ||
> -           of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
> +           of_device_is_compatible(np, "fsl,t1040-esdhc"))
>                 host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
>
>         if (of_device_is_compatible(np, "fsl,ls1021a-esdhc"))
> --
> 2.1.0.27.g96db324
>

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

end of thread, other threads:[~2017-01-12 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26  9:40 [PATCH] mmc: sdhci-of-esdhc: remove default broken-cd for ARM Yangbo Lu
2017-01-12  1:32 ` Y.B. Lu
2017-01-12  7:15 ` Adrian Hunter
2017-01-12 10:59 ` 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.