Patchwork mmc: sdhci-pltfm: Added sdhci-adjust-timeout quirk

login
register
mail settings
Submitter Xiaobo Xie
Date Dec. 5, 2011, 8:55 a.m.
Message ID <1323075320-9138-1-git-send-email-X.Xie@freescale.com>
Download mbox | patch
Permalink /patch/129257/
State Not Applicable
Headers show

Comments

Xiaobo Xie - Dec. 5, 2011, 8:55 a.m.
Some controller provides an incorrect timeout value for transfers,
So it need the quirk to adjust timeout value to 0xE.
E.g. eSDHC of MPC8536, P1010, and P2020.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
---
 drivers/mmc/host/sdhci-pltfm.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Changming Huang - Dec. 13, 2011, 8 a.m.
Xiaobo, I have one other similar patch, but the property is 'sdhci,adjust-timeout'.
Maybe I can repost it with add your signed-off-by?

> -----Original Message-----
> From: linuxppc-dev-bounces+r66093=freescale.com@lists.ozlabs.org
> [mailto:linuxppc-dev-bounces+r66093=freescale.com@lists.ozlabs.org] On
> Behalf Of Xie Xiaobo
> Sent: Monday, December 05, 2011 4:55 PM
> To: linuxppc-dev@lists.ozlabs.org
> Cc: avorontsov@ru.mvista.com; linux-mmc@vger.kernel.org; Xie Xiaobo-
> R63061
> Subject: [PATCH] mmc: sdhci-pltfm: Added sdhci-adjust-timeout quirk
> 
> Some controller provides an incorrect timeout value for transfers,
> So it need the quirk to adjust timeout value to 0xE.
> E.g. eSDHC of MPC8536, P1010, and P2020.
> 
> Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
> ---
>  drivers/mmc/host/sdhci-pltfm.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-
> pltfm.c
> index a9e12ea..b5d6b3f 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -2,7 +2,7 @@
>   * sdhci-pltfm.c Support for SDHCI platform devices
>   * Copyright (c) 2009 Intel Corporation
>   *
> - * Copyright (c) 2007 Freescale Semiconductor, Inc.
> + * Copyright (c) 2007, 2011 Freescale Semiconductor, Inc.
>   * Copyright (c) 2009 MontaVista Software, Inc.
>   *
>   * Authors: Xiaobo Xie <X.Xie@freescale.com>
> @@ -68,6 +68,9 @@ void sdhci_get_of_property(struct platform_device *pdev)
>  		if (of_get_property(np, "sdhci,1-bit-only", NULL))
>  			host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;
> 
> +		if (of_get_property(np, "sdhci,sdhci-adjust-timeout", NULL))
> +			host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
> +
>  		if (sdhci_of_wp_inverted(np))
>  			host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;
> 
> --
> 1.6.4
> 
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
Xie Xiaobo-R63061 - Dec. 14, 2011, 3:27 a.m.
Hi Changming,

OK, you can merge my patch into your patches.

Hi all,
Please ignore this patch. Changming will send the similar patch.

BRs
Xie Xiaobo

-----Original Message-----
From: Huang Changming-R66093 

Sent: 2011年12月13日 16:00
To: Xie Xiaobo-R63061; linuxppc-dev@lists.ozlabs.org
Cc: avorontsov@ru.mvista.com; linux-mmc@vger.kernel.org; Xie Xiaobo-R63061
Subject: RE: [PATCH] mmc: sdhci-pltfm: Added sdhci-adjust-timeout quirk

Xiaobo, I have one other similar patch, but the property is 'sdhci,adjust-timeout'.
Maybe I can repost it with add your signed-off-by?

> -----Original Message-----

> From: linuxppc-dev-bounces+r66093=freescale.com@lists.ozlabs.org

> [mailto:linuxppc-dev-bounces+r66093=freescale.com@lists.ozlabs.org] On 

> Behalf Of Xie Xiaobo

> Sent: Monday, December 05, 2011 4:55 PM

> To: linuxppc-dev@lists.ozlabs.org

> Cc: avorontsov@ru.mvista.com; linux-mmc@vger.kernel.org; Xie Xiaobo-

> R63061

> Subject: [PATCH] mmc: sdhci-pltfm: Added sdhci-adjust-timeout quirk

> 

> Some controller provides an incorrect timeout value for transfers, So 

> it need the quirk to adjust timeout value to 0xE.

> E.g. eSDHC of MPC8536, P1010, and P2020.

> 

> Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>

> ---

>  drivers/mmc/host/sdhci-pltfm.c |    5 ++++-

>  1 files changed, 4 insertions(+), 1 deletions(-)

> 

> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci- 

> pltfm.c index a9e12ea..b5d6b3f 100644

> --- a/drivers/mmc/host/sdhci-pltfm.c

> +++ b/drivers/mmc/host/sdhci-pltfm.c

> @@ -2,7 +2,7 @@

>   * sdhci-pltfm.c Support for SDHCI platform devices

>   * Copyright (c) 2009 Intel Corporation

>   *

> - * Copyright (c) 2007 Freescale Semiconductor, Inc.

> + * Copyright (c) 2007, 2011 Freescale Semiconductor, Inc.

>   * Copyright (c) 2009 MontaVista Software, Inc.

>   *

>   * Authors: Xiaobo Xie <X.Xie@freescale.com> @@ -68,6 +68,9 @@ void 

> sdhci_get_of_property(struct platform_device *pdev)

>  		if (of_get_property(np, "sdhci,1-bit-only", NULL))

>  			host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;

> 

> +		if (of_get_property(np, "sdhci,sdhci-adjust-timeout", NULL))

> +			host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;

> +

>  		if (sdhci_of_wp_inverted(np))

>  			host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;

> 

> --

> 1.6.4

> 

> 

> _______________________________________________

> Linuxppc-dev mailing list

> Linuxppc-dev@lists.ozlabs.org

> https://lists.ozlabs.org/listinfo/linuxppc-dev

Patch

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index a9e12ea..b5d6b3f 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -2,7 +2,7 @@ 
  * sdhci-pltfm.c Support for SDHCI platform devices
  * Copyright (c) 2009 Intel Corporation
  *
- * Copyright (c) 2007 Freescale Semiconductor, Inc.
+ * Copyright (c) 2007, 2011 Freescale Semiconductor, Inc.
  * Copyright (c) 2009 MontaVista Software, Inc.
  *
  * Authors: Xiaobo Xie <X.Xie@freescale.com>
@@ -68,6 +68,9 @@  void sdhci_get_of_property(struct platform_device *pdev)
 		if (of_get_property(np, "sdhci,1-bit-only", NULL))
 			host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;
 
+		if (of_get_property(np, "sdhci,sdhci-adjust-timeout", NULL))
+			host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+
 		if (sdhci_of_wp_inverted(np))
 			host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT;