public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board
@ 2013-07-08  7:16 Haijun Zhang
  2013-07-08  7:16 ` [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board Haijun Zhang
  2013-07-08 17:14 ` [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Scott Wood
  0 siblings, 2 replies; 11+ messages in thread
From: Haijun Zhang @ 2013-07-08  7:16 UTC (permalink / raw)
  To: linux-mmc, linuxppc-dev
  Cc: cbouatmailru, cjb, scottwood, AFLEMING, r39252, Haijun Zhang

In order to make a difference between different T4240 board.
Specify T4240QDS board the unique compatible flags for t4240qds
eSDHC host.

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
---
 arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
index bd611a9..08b47d0 100644
--- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
@@ -397,7 +397,7 @@
 
 /include/ "qoriq-esdhc-0.dtsi"
 	sdhc@114000 {
-		compatible = "fsl,t4240-esdhc", "fsl,esdhc";
+		compatible = "fsl,t4240qds-esdhc", "fsl,esdhc";
 		sdhci,auto-cmd12;
 	};
 /include/ "qoriq-i2c-0.dtsi"
-- 
1.8.0



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

* [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board
  2013-07-08  7:16 [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Haijun Zhang
@ 2013-07-08  7:16 ` Haijun Zhang
  2013-07-08 17:18   ` Scott Wood
  2013-07-08 17:14 ` [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Scott Wood
  1 sibling, 1 reply; 11+ messages in thread
From: Haijun Zhang @ 2013-07-08  7:16 UTC (permalink / raw)
  To: linux-mmc, linuxppc-dev
  Cc: cbouatmailru, cjb, scottwood, AFLEMING, r39252, Haijun Zhang,
	Haijun Zhang

On T4240QDS board controllers has an unusable ADMA engine, so use SDMA instead.
Also 3.0v is support on T4240QDS board even if the capacity detailed only 1.8v
support. Without this quirk SD card will declare voltage not support and

Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
---
changes for v2:
	- Change the compatible for t4240qds board

 drivers/mmc/host/sdhci-pltfm.c | 7 ++++++-
 drivers/mmc/host/sdhci.c       | 3 +++
 include/linux/mmc/sdhci.h      | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index e2065a4..800e82f 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -92,9 +92,14 @@ void sdhci_get_of_property(struct platform_device *pdev)
 		if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
 			host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
 
+		if (of_device_is_compatible(np, "fsl,t4240qds-esdhc")) {
+			host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
+			host->quirks2 |= SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS30;
+		}
+
 		if (of_device_is_compatible(np, "fsl,p2020-esdhc") ||
 		    of_device_is_compatible(np, "fsl,p1010-esdhc") ||
-		    of_device_is_compatible(np, "fsl,t4240-esdhc") ||
+		    of_device_is_compatible(np, "fsl,t4240qds-esdhc") ||
 		    of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
 			host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
 
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index a78bd4f..de7fa81 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2797,6 +2797,9 @@ int sdhci_add_host(struct sdhci_host *host)
 			host->caps1 :
 			sdhci_readl(host, SDHCI_CAPABILITIES_1);
 
+	if (host->quirks2 & SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS30)
+		caps[0] = caps[0] | SDHCI_CAN_VDD_300;
+
 	if (host->quirks & SDHCI_QUIRK_FORCE_DMA)
 		host->flags |= SDHCI_USE_SDMA;
 	else if (!(caps[0] & SDHCI_CAN_DO_SDMA))
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index e3c6a74..dc608d7 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -98,6 +98,8 @@ struct sdhci_host {
 #define SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON		(1<<4)
 /* Controller has a non-standard host control register */
 #define SDHCI_QUIRK2_BROKEN_HOST_CONTROL		(1<<5)
+/* The host support VS300 even if the capacity detailed not */
+#define SDHCI_QUIRK2_CIRCUIT_SUPPORT_VS30		(1<<6)
 
 	int irq;		/* Device IRQ */
 	void __iomem *ioaddr;	/* Mapped address */
-- 
1.8.0



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

* Re: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board
  2013-07-08  7:16 [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Haijun Zhang
  2013-07-08  7:16 ` [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board Haijun Zhang
@ 2013-07-08 17:14 ` Scott Wood
  2013-07-09  6:04   ` 答复: " Zhang Haijun-B42677
  1 sibling, 1 reply; 11+ messages in thread
From: Scott Wood @ 2013-07-08 17:14 UTC (permalink / raw)
  Cc: linux-mmc, linuxppc-dev, cbouatmailru, cjb, AFLEMING, r39252,
	Haijun Zhang

On 07/08/2013 02:16:03 AM, Haijun Zhang wrote:
> In order to make a difference between different T4240 board.
> Specify T4240QDS board the unique compatible flags for t4240qds
> eSDHC host.
> 
> Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
> ---
>  arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi  
> b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> index bd611a9..08b47d0 100644
> --- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> @@ -397,7 +397,7 @@
> 
>  /include/ "qoriq-esdhc-0.dtsi"
>  	sdhc@114000 {
> -		compatible = "fsl,t4240-esdhc", "fsl,esdhc";
> +		compatible = "fsl,t4240qds-esdhc", "fsl,esdhc";
>  		sdhci,auto-cmd12;
>  	};

NACK.  This node is describing the sdhc block of the t4240 SoC.  What  
board you stick it in doesn't change what it is.

Plus, what about users with old device trees?

-Scott

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

* Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board
  2013-07-08  7:16 ` [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board Haijun Zhang
@ 2013-07-08 17:18   ` Scott Wood
  2013-07-12 18:35     ` Anton Vorontsov
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Wood @ 2013-07-08 17:18 UTC (permalink / raw)
  Cc: linux-mmc, linuxppc-dev, cbouatmailru, cjb, AFLEMING, r39252,
	Haijun Zhang, Haijun Zhang

On 07/08/2013 02:16:04 AM, Haijun Zhang wrote:
> On T4240QDS board controllers has an unusable ADMA engine, so use  
> SDMA instead.
> Also 3.0v is support on T4240QDS board even if the capacity detailed  
> only 1.8v
> support. Without this quirk SD card will declare voltage not support  
> and
> 
> Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>

...and what?

Why is this board-specific?  Isn't the controller part of the SoC, not  
part of the board?  If it really is board-specific, could you be more  
detailed about why (ideally with an erratum number), and check the  
toplevel board compatible (or get the information from platform code)  
rather than modify the device tree?

-Scott

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

* 答复: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board
  2013-07-08 17:14 ` [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Scott Wood
@ 2013-07-09  6:04   ` Zhang Haijun-B42677
  2013-07-09 20:04     ` Scott Wood
  0 siblings, 1 reply; 11+ messages in thread
From: Zhang Haijun-B42677 @ 2013-07-09  6:04 UTC (permalink / raw)
  To: Wood Scott-B07421
  Cc: linux-mmc@vger.kernel.org, Wrobel Heinz-R39252,
	Fleming Andy-AFLEMING, cbouatmailru@gmail.com, cjb@laptop.org,
	linuxppc-dev@lists.ozlabs.org



Regards & Thanks

Haijun.

________________________________________
发件人: Wood Scott-B07421
发送时间: 2013年7月8日 17:14
收件人: Zhang Haijun-B42677
抄送: linux-mmc@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; cbouatmailru@gmail.com; cjb@laptop.org; Fleming Andy-AFLEMING; Wrobel Heinz-R39252; Zhang Haijun-B42677
主题: Re: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board

On 07/08/2013 02:16:03 AM, Haijun Zhang wrote:
> In order to make a difference between different T4240 board.
> Specify T4240QDS board the unique compatible flags for t4240qds
> eSDHC host.
>
> Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
> ---
>  arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> index bd611a9..08b47d0 100644
> --- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> @@ -397,7 +397,7 @@
>
>  /include/ "qoriq-esdhc-0.dtsi"
>       sdhc@114000 {
> -             compatible = "fsl,t4240-esdhc", "fsl,esdhc";
> +             compatible = "fsl,t4240qds-esdhc", "fsl,esdhc";
>               sdhci,auto-cmd12;
>       };

NACK.  This node is describing the sdhc block of the t4240 SoC.  What
board you stick it in doesn't change what it is.

Plus, what about users with old device trees?

Currently no users use this ip block except esdhc driver.

How about change this in arch/powerpc/boot/dts/t4240qds.dts

+++ b/arch/powerpc/boot/dts/t4240qds.dts
@@ -117,6 +117,10 @@
                        };
                };
 
               sdhc@114000 {
                      compatible = "fsl,t4240-esdhc", "fsl,esdhc";
               };

               i2c@118000 {
            

+++ b/arch/powerpc/boot/dts/t4240qds.dts
@@ -117,6 +117,10 @@
                        };
                };
 
+               sdhc@114000 {
+                       compatible = "fsl,t4240qds-esdhc", "fsl,esdhc";
+               };
+
                i2c@118000 {
            

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

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

* Re: 答复: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board
  2013-07-09  6:04   ` 答复: " Zhang Haijun-B42677
@ 2013-07-09 20:04     ` Scott Wood
  2013-07-10  3:41       ` Zhang Haijun-B42677
  0 siblings, 1 reply; 11+ messages in thread
From: Scott Wood @ 2013-07-09 20:04 UTC (permalink / raw)
  To: Zhang Haijun-B42677
  Cc: Wood Scott-B07421, linux-mmc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, cbouatmailru@gmail.com,
	cjb@laptop.org, Fleming Andy-AFLEMING, Wrobel Heinz-R39252

On 07/09/2013 01:04:01 AM, Zhang Haijun-B42677 wrote:
> 
> 
> Regards & Thanks
> 
> Haijun.
> 
> ________________________________________
> 发件人: Wood Scott-B07421
> 发送时间: 2013年7月8日 17:14
> 收件人: Zhang Haijun-B42677
> 抄送: linux-mmc@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;  
> cbouatmailru@gmail.com; cjb@laptop.org; Fleming Andy-AFLEMING; Wrobel  
> Heinz-R39252; Zhang Haijun-B42677
> 主题: Re: [PATCH] Powerpc/t4240: change the compatible flags for  
> t4240qds board
> 
> On 07/08/2013 02:16:03 AM, Haijun Zhang wrote:
> > In order to make a difference between different T4240 board.
> > Specify T4240QDS board the unique compatible flags for t4240qds
> > eSDHC host.
> >
> > Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
> > ---
> >  arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > index bd611a9..08b47d0 100644
> > --- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > +++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > @@ -397,7 +397,7 @@
> >
> >  /include/ "qoriq-esdhc-0.dtsi"
> >       sdhc@114000 {
> > -             compatible = "fsl,t4240-esdhc", "fsl,esdhc";
> > +             compatible = "fsl,t4240qds-esdhc", "fsl,esdhc";
> >               sdhci,auto-cmd12;
> >       };
> 
> NACK.  This node is describing the sdhc block of the t4240 SoC.  What
> board you stick it in doesn't change what it is.
> 
> Plus, what about users with old device trees?
> 
> Currently no users use this ip block except esdhc driver.

I'm not talking about code users.  I'm talking about people users.

> How about change this in arch/powerpc/boot/dts/t4240qds.dts
> 
> +++ b/arch/powerpc/boot/dts/t4240qds.dts
> @@ -117,6 +117,10 @@
>                         };
>                 };
> 
>                sdhc@114000 {
>                       compatible = "fsl,t4240-esdhc", "fsl,esdhc";
>                };
> 
>                i2c@118000 {
> 
> 
> +++ b/arch/powerpc/boot/dts/t4240qds.dts
> @@ -117,6 +117,10 @@
>                         };
>                 };
> 
> +               sdhc@114000 {
> +                       compatible = "fsl,t4240qds-esdhc",  
> "fsl,esdhc";
> +               };
> +
>                 i2c@118000 {

No.  It's still supposed to be describing the sdhc block itself, not  
the board -- and any workarounds that key off of this will still fail  
to work with existing device trees.

-Scott

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

* RE: 答复: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board
  2013-07-09 20:04     ` Scott Wood
@ 2013-07-10  3:41       ` Zhang Haijun-B42677
  2013-07-10 20:30         ` Scott Wood
  0 siblings, 1 reply; 11+ messages in thread
From: Zhang Haijun-B42677 @ 2013-07-10  3:41 UTC (permalink / raw)
  To: Wood Scott-B07421
  Cc: linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	cbouatmailru@gmail.com, cjb@laptop.org, Fleming Andy-AFLEMING,
	Wrobel Heinz-R39252



Thanks.

Regards
Haijun.

> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Wednesday, July 10, 2013 4:04 AM
> To: Zhang Haijun-B42677
> Cc: Wood Scott-B07421; linux-mmc@vger.kernel.org; linuxppc-
> dev@lists.ozlabs.org; cbouatmailru@gmail.com; cjb@laptop.org; Fleming
> Andy-AFLEMING; Wrobel Heinz-R39252
> Subject: Re: 答复: [PATCH] Powerpc/t4240: change the compatible flags for
> t4240qds board
> 
> On 07/09/2013 01:04:01 AM, Zhang Haijun-B42677 wrote:
> >
> >
> > Regards & Thanks
> >
> > Haijun.
> >
> > ________________________________________
> > 发件人: Wood Scott-B07421
> > 发送时间: 2013年7月8日 17:14
> > 收件人: Zhang Haijun-B42677
> > 抄送: linux-mmc@vger.kernel.org; linuxppc-dev@lists.ozlabs.org;
> > cbouatmailru@gmail.com; cjb@laptop.org; Fleming Andy-AFLEMING; Wrobel
> > Heinz-R39252; Zhang Haijun-B42677
> > 主题: Re: [PATCH] Powerpc/t4240: change the compatible flags for
> > t4240qds board
> >
> > On 07/08/2013 02:16:03 AM, Haijun Zhang wrote:
> > > In order to make a difference between different T4240 board.
> > > Specify T4240QDS board the unique compatible flags for t4240qds
> > > eSDHC host.
> > >
> > > Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
> > > ---
> > >  arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > > b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > > index bd611a9..08b47d0 100644
> > > --- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > > +++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
> > > @@ -397,7 +397,7 @@
> > >
> > >  /include/ "qoriq-esdhc-0.dtsi"
> > >       sdhc@114000 {
> > > -             compatible = "fsl,t4240-esdhc", "fsl,esdhc";
> > > +             compatible = "fsl,t4240qds-esdhc", "fsl,esdhc";
> > >               sdhci,auto-cmd12;
> > >       };
> >
> > NACK.  This node is describing the sdhc block of the t4240 SoC.  What
> > board you stick it in doesn't change what it is.
> >
> > Plus, what about users with old device trees?
> >
> > Currently no users use this ip block except esdhc driver.
> 
> I'm not talking about code users.  I'm talking about people users.
> 
> > How about change this in arch/powerpc/boot/dts/t4240qds.dts
> >
> > +++ b/arch/powerpc/boot/dts/t4240qds.dts
> > @@ -117,6 +117,10 @@
> >                         };
> >                 };
> >
> >                sdhc@114000 {
> >                       compatible = "fsl,t4240-esdhc", "fsl,esdhc";
> >                };
> >
> >                i2c@118000 {
> >
> >
> > +++ b/arch/powerpc/boot/dts/t4240qds.dts
> > @@ -117,6 +117,10 @@
> >                         };
> >                 };
> >
> > +               sdhc@114000 {
> > +                       compatible = "fsl,t4240qds-esdhc",
> > "fsl,esdhc";
> > +               };
> > +
> >                 i2c@118000 {
> 
> No.  It's still supposed to be describing the sdhc block itself, not the
> board -- and any workarounds that key off of this will still fail to work
> with existing device trees.
[Haijun Wrote:] So, leave dts unchanged and to check compitable for board in sdhci-pltfm.c
e.g.:
	unsigned long root = of_get_flat_dt_root();

	if (of_flat_dt_is_compatible(root, "fsl,T4240QDS"))
		host->quirks |= XXX;

Is this ok?
	
> 
> -Scott

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

* Re: 答复: [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board
  2013-07-10  3:41       ` Zhang Haijun-B42677
@ 2013-07-10 20:30         ` Scott Wood
  0 siblings, 0 replies; 11+ messages in thread
From: Scott Wood @ 2013-07-10 20:30 UTC (permalink / raw)
  To: Zhang Haijun-B42677
  Cc: Wood Scott-B07421, linux-mmc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, cbouatmailru@gmail.com,
	cjb@laptop.org, Fleming Andy-AFLEMING, Wrobel Heinz-R39252

On 07/09/2013 10:41:22 PM, Zhang Haijun-B42677 wrote:
> > No.  It's still supposed to be describing the sdhc block itself,  
> not the
> > board -- and any workarounds that key off of this will still fail  
> to work
> > with existing device trees.
> [Haijun Wrote:] So, leave dts unchanged and to check compitable for  
> board in sdhci-pltfm.c
> e.g.:
> 	unsigned long root = of_get_flat_dt_root();
> 
> 	if (of_flat_dt_is_compatible(root, "fsl,T4240QDS"))
> 		host->quirks |= XXX;

Why are you looking at the flat tree at this point?  Use the normal OF  
accessors.  The flat stuff is only for early boot.

Also make sure that you only do this for quirks that are actually  
board-specific.  In your last patch you had two quirks keyed off of the  
board, one of which is keyed off of the SoC for other chips.

-SCott

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

* Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board
  2013-07-08 17:18   ` Scott Wood
@ 2013-07-12 18:35     ` Anton Vorontsov
  2013-07-16  3:11       ` Zhang Haijun-B42677
  0 siblings, 1 reply; 11+ messages in thread
From: Anton Vorontsov @ 2013-07-12 18:35 UTC (permalink / raw)
  To: Scott Wood; +Cc: Haijun Zhang, linux-mmc, linuxppc-dev, cjb, AFLEMING, r39252

On Mon, Jul 08, 2013 at 12:18:39PM -0500, Scott Wood wrote:
> On 07/08/2013 02:16:04 AM, Haijun Zhang wrote:
> >On T4240QDS board controllers has an unusable ADMA engine, so use
> >SDMA instead.
> >Also 3.0v is support on T4240QDS board even if the capacity
> >detailed only 1.8v
> >support. Without this quirk SD card will declare voltage not
> >support and
> >
> >Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
> 
> ...and what?
> 
> Why is this board-specific?  Isn't the controller part of the SoC,
> not part of the board?  If it really is board-specific, could you be
> more detailed about why (ideally with an erratum number), and check
> the toplevel board compatible (or get the information from platform
> code) rather than modify the device tree?

Yup, and if anything, I would recommend to reuse voltage-ranges property,
it is already implemented for mmc spi driver,

drivers/mmc/host/of_mmc_spi.c
Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt

Thanks,

Anton

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

* RE: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board
  2013-07-12 18:35     ` Anton Vorontsov
@ 2013-07-16  3:11       ` Zhang Haijun-B42677
  2013-07-16  5:04         ` Anton Vorontsov
  0 siblings, 1 reply; 11+ messages in thread
From: Zhang Haijun-B42677 @ 2013-07-16  3:11 UTC (permalink / raw)
  To: Anton Vorontsov, Wood Scott-B07421
  Cc: linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	cjb@laptop.org, Fleming Andy-AFLEMING, Wrobel Heinz-R39252

Hi, Anton

You mean get voltage support from DTS?
Or get voltage both from DTS and host capacity register?

Thanks.

Regards
Haijun.


> -----Original Message-----
> From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> owner@vger.kernel.org] On Behalf Of Anton Vorontsov
> Sent: Saturday, July 13, 2013 2:35 AM
> To: Wood Scott-B07421
> Cc: Zhang Haijun-B42677; linux-mmc@vger.kernel.org; linuxppc-
> dev@lists.ozlabs.org; cjb@laptop.org; Fleming Andy-AFLEMING; Wrobel
> Heinz-R39252
> Subject: Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS
> board
> 
> On Mon, Jul 08, 2013 at 12:18:39PM -0500, Scott Wood wrote:
> > On 07/08/2013 02:16:04 AM, Haijun Zhang wrote:
> > >On T4240QDS board controllers has an unusable ADMA engine, so use
> > >SDMA instead.
> > >Also 3.0v is support on T4240QDS board even if the capacity detailed
> > >only 1.8v support. Without this quirk SD card will declare voltage
> > >not support and
> > >
> > >Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
> >
> > ...and what?
> >
> > Why is this board-specific?  Isn't the controller part of the SoC, not
> > part of the board?  If it really is board-specific, could you be more
> > detailed about why (ideally with an erratum number), and check the
> > toplevel board compatible (or get the information from platform
> > code) rather than modify the device tree?
> 
> Yup, and if anything, I would recommend to reuse voltage-ranges property,
> it is already implemented for mmc spi driver,
> 
> drivers/mmc/host/of_mmc_spi.c
> Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
> 
> Thanks,
> 
> Anton
> --
> 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] 11+ messages in thread

* Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board
  2013-07-16  3:11       ` Zhang Haijun-B42677
@ 2013-07-16  5:04         ` Anton Vorontsov
  0 siblings, 0 replies; 11+ messages in thread
From: Anton Vorontsov @ 2013-07-16  5:04 UTC (permalink / raw)
  To: Zhang Haijun-B42677
  Cc: Wood Scott-B07421, linux-mmc@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, cjb@laptop.org,
	Fleming Andy-AFLEMING, Wrobel Heinz-R39252

On Tue, Jul 16, 2013 at 03:11:47AM +0000, Zhang Haijun-B42677 wrote:
> Hi, Anton
> 
> You mean get voltage support from DTS?
> Or get voltage both from DTS and host capacity register?

The logic might be that you first check device-tree, if it specifies
voltage ranges, assume that DTS knows better, otherwise read capabilities
from the register.

Anton

> Thanks.
> 
> Regards
> Haijun.
> 
> 
> > -----Original Message-----
> > From: linux-mmc-owner@vger.kernel.org [mailto:linux-mmc-
> > owner@vger.kernel.org] On Behalf Of Anton Vorontsov
> > Sent: Saturday, July 13, 2013 2:35 AM
> > To: Wood Scott-B07421
> > Cc: Zhang Haijun-B42677; linux-mmc@vger.kernel.org; linuxppc-
> > dev@lists.ozlabs.org; cjb@laptop.org; Fleming Andy-AFLEMING; Wrobel
> > Heinz-R39252
> > Subject: Re: [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS
> > board
> > 
> > On Mon, Jul 08, 2013 at 12:18:39PM -0500, Scott Wood wrote:
> > > On 07/08/2013 02:16:04 AM, Haijun Zhang wrote:
> > > >On T4240QDS board controllers has an unusable ADMA engine, so use
> > > >SDMA instead.
> > > >Also 3.0v is support on T4240QDS board even if the capacity detailed
> > > >only 1.8v support. Without this quirk SD card will declare voltage
> > > >not support and
> > > >
> > > >Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
> > >
> > > ...and what?
> > >
> > > Why is this board-specific?  Isn't the controller part of the SoC, not
> > > part of the board?  If it really is board-specific, could you be more
> > > detailed about why (ideally with an erratum number), and check the
> > > toplevel board compatible (or get the information from platform
> > > code) rather than modify the device tree?
> > 
> > Yup, and if anything, I would recommend to reuse voltage-ranges property,
> > it is already implemented for mmc spi driver,
> > 
> > drivers/mmc/host/of_mmc_spi.c
> > Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
> > 
> > Thanks,
> > 
> > Anton
> > --
> > 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] 11+ messages in thread

end of thread, other threads:[~2013-07-16  5:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08  7:16 [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Haijun Zhang
2013-07-08  7:16 ` [PATCH 3/4 V2] mmc: esdhc: Add quirks to support T4240QDS board Haijun Zhang
2013-07-08 17:18   ` Scott Wood
2013-07-12 18:35     ` Anton Vorontsov
2013-07-16  3:11       ` Zhang Haijun-B42677
2013-07-16  5:04         ` Anton Vorontsov
2013-07-08 17:14 ` [PATCH] Powerpc/t4240: change the compatible flags for t4240qds board Scott Wood
2013-07-09  6:04   ` 答复: " Zhang Haijun-B42677
2013-07-09 20:04     ` Scott Wood
2013-07-10  3:41       ` Zhang Haijun-B42677
2013-07-10 20:30         ` Scott Wood

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