linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
       [not found]   ` <20120911075429.GA27028@lizard>
@ 2012-09-11  8:04     ` Anton Vorontsov
  2012-09-11  9:36       ` Huang Changming-R66093
  2012-09-11 18:28       ` Scott Wood
  0 siblings, 2 replies; 23+ messages in thread
From: Anton Vorontsov @ 2012-09-11  8:04 UTC (permalink / raw)
  To: Chang-Ming.Huang; +Cc: linuxppc-dev, linux-mmc

On Tue, Sep 11, 2012 at 12:54:29AM -0700, Anton Vorontsov wrote:
> On Tue, Sep 11, 2012 at 03:12:44PM +0800, Chang-Ming.Huang@freescale.com wrote:
> > From: Jerry Huang <Chang-Ming.Huang@freescale.com>
> > 
> > Below SOCs don't support the cmd23 command for MMC card,
> > therefore, disable it in device tree:
> > P1020, P1021, P1022, P1024, P1025 and P4080
> > 
> > Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> 
> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Btw, although the patch is trivial, I guess you still want to let know
PowerPC folks about it. Adding Cc and copying the patch:

- - - -
From: Jerry Huang <Chang-Ming.Huang@freescale.com>

Below SOCs don't support the cmd23 command for MMC card,
therefore, disable it in device tree:
P1020, P1021, P1022, P1024, P1025 and P4080

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
CC: Anton Vorontsov <cbouatmailru@gmail.com>
---
 arch/powerpc/boot/dts/fsl/p1020si-post.dtsi |    1 +
 arch/powerpc/boot/dts/fsl/p1021si-post.dtsi |    1 +
 arch/powerpc/boot/dts/fsl/p1022si-post.dtsi |    1 +
 arch/powerpc/boot/dts/fsl/p4080si-post.dtsi |    1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
index 68cc5e7..793a30b 100644
--- a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
@@ -154,6 +154,7 @@
 	sdhc@2e000 {
 		compatible = "fsl,p1020-esdhc", "fsl,esdhc";
 		sdhci,auto-cmd12;
+		sdhci,no-cmd23;
 	};
 /include/ "pq3-sec3.3-0.dtsi"
 
diff --git a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
index adb82fd..2b7fd2a 100644
--- a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
@@ -149,6 +149,7 @@
 /include/ "pq3-esdhc-0.dtsi"
 	sdhc@2e000 {
 		sdhci,auto-cmd12;
+		sdhci,no-cmd23;
 	};
 
 /include/ "pq3-sec3.3-0.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
index 06216b8..2334a52 100644
--- a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
@@ -215,6 +215,7 @@
 	sdhc@2e000 {
 		compatible = "fsl,p1022-esdhc", "fsl,esdhc";
 		sdhci,auto-cmd12;
+		sdhci,no-cmd23;
 	};
 
 /include/ "pq3-sec3.3-0.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
index 8d35d2c..5b39952 100644
--- a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
@@ -337,6 +337,7 @@
 	sdhc@114000 {
 		voltage-ranges = <3300 3300>;
 		sdhci,auto-cmd12;
+		sdhci,no-cmd23;
 	};
 
 /include/ "qoriq-i2c-0.dtsi"
-- 
1.7.9.5

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11  8:04     ` [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23 Anton Vorontsov
@ 2012-09-11  9:36       ` Huang Changming-R66093
  2012-09-11 12:43         ` Kumar Gala
  2012-09-11 18:28       ` Scott Wood
  1 sibling, 1 reply; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-11  9:36 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev, linux-mmc

VGhhbmtzLCBBbnRvbi4NCklmIGl0IGlzIG5lY2Vzc2FyeSwgSSB3aWxsIHJlc2VuZCB0aGlzIHBh
dGNoIHRvIGxpbnV4cHBjLWRldkBsaXN0cy5vemxhYnMub3JnLg0KDQpCZXN0IFJlZ2FyZHMNCkpl
cnJ5IEh1YW5nDQoNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBBbnRv
biBWb3JvbnRzb3YgW21haWx0bzpjYm91YXRtYWlscnVAZ21haWwuY29tXQ0KPiBTZW50OiBUdWVz
ZGF5LCBTZXB0ZW1iZXIgMTEsIDIwMTIgNDowNSBQTQ0KPiBUbzogSHVhbmcgQ2hhbmdtaW5nLVI2
NjA5Mw0KPiBDYzogbGludXgtbW1jQHZnZXIua2VybmVsLm9yZzsgS3VtYXIgR2FsYTsgbGludXhw
cGMtZGV2QGxpc3RzLm96bGFicy5vcmcNCj4gU3ViamVjdDogUmU6IFtQQVRDSCAyLzNdIHBvd2Vy
cGMvZXNkaGM6IGFkZCBwcm9wZXJ0eSB0byBkaXNhYmxlIHRoZSBDTUQyMw0KPiANCj4gT24gVHVl
LCBTZXAgMTEsIDIwMTIgYXQgMTI6NTQ6MjlBTSAtMDcwMCwgQW50b24gVm9yb250c292IHdyb3Rl
Og0KPiA+IE9uIFR1ZSwgU2VwIDExLCAyMDEyIGF0IDAzOjEyOjQ0UE0gKzA4MDAsIENoYW5nLQ0K
PiBNaW5nLkh1YW5nQGZyZWVzY2FsZS5jb20gd3JvdGU6D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CQlz
ZGhjaSxhdXRvLWNtZDEyOw0KPiArCQlzZGhjaSxuby1jbWQyMzsNCj4gIAl9Ow0KPiANCj4gIC9p
bmNsdWRlLyAicHEzLXNlYzMuMy0wLmR0c2kiDQo+IGRpZmYgLS1naXQgYS9hcmNoL3Bvd2VycGMv
Ym9vdC9kdHMvZnNsL3A0MDgwc2ktcG9zdC5kdHNpDQo+IGIvYXJjaC9wb3dlcnBjL2Jvb3QvZHRz
L2ZzbC9wNDA4MHNpLXBvc3QuZHRzaQ0KPiBpbmRleCA4ZDM1ZDJjLi41YjM5OTUyIDEwMDY0NA0K
PiAtLS0gYS9hcmNoL3Bvd2VycGMvYm9vdC9kdHMvZnNsL3A0MDgwc2ktcG9zdC5kdHNpDQo+ICsr
KyBiL2FyY2gvcG93ZXJwYy9ib290L2R0cy9mc2wvcDQwODBzaS1wb3N0LmR0c2kNCj4gQEAgLTMz
Nyw2ICszMzcsNyBAQA0KPiAgCXNkaGNAMTE0MDAwIHsNCj4gIAkJdm9sdGFnZS1yYW5nZXMgPSA8
MzMwMCAzMzAwPjsNCj4gIAkJc2RoY2ksYXV0by1jbWQxMjsNCj4gKwkJc2RoY2ksbm8tY21kMjM7
DQo+ICAJfTsNCj4gDQo+ICAvaW5jbHVkZS8gInFvcmlxLWkyYy0wLmR0c2kiDQo+IC0tDQo+IDEu
Ny45LjUNCg0K

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11  9:36       ` Huang Changming-R66093
@ 2012-09-11 12:43         ` Kumar Gala
  2012-09-11 12:49           ` Kumar Gala
  0 siblings, 1 reply; 23+ messages in thread
From: Kumar Gala @ 2012-09-11 12:43 UTC (permalink / raw)
  To: Huang Changming-R66093; +Cc: linuxppc-dev, linux-mmc, Anton Vorontsov


On Sep 11, 2012, at 4:36 AM, Huang Changming-R66093 wrote:

> Thanks, Anton.
> If it is necessary, I will resend this patch to =
linuxppc-dev@lists.ozlabs.org.
>=20
> Best Regards
> Jerry Huang

I'm still not convinced this is the way to handle this issue.  It seems =
as if the linux driver code makes some assumptions about CMD23 support =
that it shouldn't.

- k

>=20
>=20
>> -----Original Message-----
>> From: Anton Vorontsov [mailto:cbouatmailru@gmail.com]
>> Sent: Tuesday, September 11, 2012 4:05 PM
>> To: Huang Changming-R66093
>> Cc: linux-mmc@vger.kernel.org; Kumar Gala; =
linuxppc-dev@lists.ozlabs.org
>> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the =
CMD23
>>=20
>> On Tue, Sep 11, 2012 at 12:54:29AM -0700, Anton Vorontsov wrote:
>>> On Tue, Sep 11, 2012 at 03:12:44PM +0800, Chang-
>> Ming.Huang@freescale.com wrote:
>>>> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
>>>>=20
>>>> Below SOCs don't support the cmd23 command for MMC card, therefore,
>>>> disable it in device tree:
>>>> P1020, P1021, P1022, P1024, P1025 and P4080
>>>>=20
>>>> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
>>>=20
>>> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
>>=20
>> Btw, although the patch is trivial, I guess you still want to let =
know
>> PowerPC folks about it. Adding Cc and copying the patch:
>>=20
>> - - - -
>> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
>>=20
>> Below SOCs don't support the cmd23 command for MMC card, therefore,
>> disable it in device tree:
>> P1020, P1021, P1022, P1024, P1025 and P4080
>>=20
>> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
>> CC: Anton Vorontsov <cbouatmailru@gmail.com>
>> ---
>> arch/powerpc/boot/dts/fsl/p1020si-post.dtsi |    1 +
>> arch/powerpc/boot/dts/fsl/p1021si-post.dtsi |    1 +
>> arch/powerpc/boot/dts/fsl/p1022si-post.dtsi |    1 +
>> arch/powerpc/boot/dts/fsl/p4080si-post.dtsi |    1 +
>> 4 files changed, 4 insertions(+)
>>=20
>> diff --git a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
>> b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
>> index 68cc5e7..793a30b 100644
>> --- a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
>> @@ -154,6 +154,7 @@
>> 	sdhc@2e000 {
>> 		compatible =3D "fsl,p1020-esdhc", "fsl,esdhc";
>> 		sdhci,auto-cmd12;
>> +		sdhci,no-cmd23;
>> 	};
>> /include/ "pq3-sec3.3-0.dtsi"
>>=20
>> diff --git a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
>> b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
>> index adb82fd..2b7fd2a 100644
>> --- a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
>> @@ -149,6 +149,7 @@
>> /include/ "pq3-esdhc-0.dtsi"
>> 	sdhc@2e000 {
>> 		sdhci,auto-cmd12;
>> +		sdhci,no-cmd23;
>> 	};
>>=20
>> /include/ "pq3-sec3.3-0.dtsi"
>> diff --git a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
>> b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
>> index 06216b8..2334a52 100644
>> --- a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
>> @@ -215,6 +215,7 @@
>> 	sdhc@2e000 {
>> 		compatible =3D "fsl,p1022-esdhc", "fsl,esdhc";
>> 		sdhci,auto-cmd12;
>> +		sdhci,no-cmd23;
>> 	};
>>=20
>> /include/ "pq3-sec3.3-0.dtsi"
>> diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
>> b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
>> index 8d35d2c..5b39952 100644
>> --- a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
>> +++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
>> @@ -337,6 +337,7 @@
>> 	sdhc@114000 {
>> 		voltage-ranges =3D <3300 3300>;
>> 		sdhci,auto-cmd12;
>> +		sdhci,no-cmd23;
>> 	};
>>=20
>> /include/ "qoriq-i2c-0.dtsi"
>> --
>> 1.7.9.5
>=20

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11 12:43         ` Kumar Gala
@ 2012-09-11 12:49           ` Kumar Gala
  2012-09-11 14:44             ` Chris Ball
  0 siblings, 1 reply; 23+ messages in thread
From: Kumar Gala @ 2012-09-11 12:49 UTC (permalink / raw)
  To: Huang Changming-R66093
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov

In sdhci_add_host()

We have the following

...
        mmc->caps |=3D MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;

        if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
                host->flags |=3D SDHCI_AUTO_CMD12;

        /* Auto-CMD23 stuff only works in ADMA or PIO. */
        if ((host->version >=3D SDHCI_SPEC_300) &&
            ((host->flags & SDHCI_USE_ADMA) ||
             !(host->flags & SDHCI_USE_SDMA))) {
                host->flags |=3D SDHCI_AUTO_CMD23;
                DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc));
        } else {
                DBG("%s: Auto-CMD23 unavailable\n", mmc_hostname(mmc));
        }

...

I'm not clear what the difference is between mmc->caps & host->flags, =
but shouldn't we move setting MMC_CAP_CMD23 inside the 'Auto-CMD23' if =
check?

- k=

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11 12:49           ` Kumar Gala
@ 2012-09-11 14:44             ` Chris Ball
  2012-09-11 20:26               ` Kumar Gala
  0 siblings, 1 reply; 23+ messages in thread
From: Chris Ball @ 2012-09-11 14:44 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov

Hi,

On Tue, Sep 11 2012, Kumar Gala wrote:
> In sdhci_add_host()
>
> We have the following
>
> ...
>         mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | MMC_CAP_CMD23;
>
>         if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
>                 host->flags |= SDHCI_AUTO_CMD12;
>
>         /* Auto-CMD23 stuff only works in ADMA or PIO. */
>         if ((host->version >= SDHCI_SPEC_300) &&
>             ((host->flags & SDHCI_USE_ADMA) ||
>              !(host->flags & SDHCI_USE_SDMA))) {
>                 host->flags |= SDHCI_AUTO_CMD23;
>                 DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc));
>         } else {
>                 DBG("%s: Auto-CMD23 unavailable\n", mmc_hostname(mmc));
>         }
>
> ...
>
> I'm not clear what the difference is between mmc->caps & host->flags, but shouldn't we move setting MMC_CAP_CMD23 inside the 'Auto-CMD23' if check?

The main answer is:  No, because CMD23 is distinct from Auto-CMD23.

Multiblock transfers (CMD23) date back from MMC cards (which is why
they're an MMC host capability) and can also be used in SDHCI.

Auto-CMD23 is a new feature in SDHCI 3.0 that reduces the overhead
of sending CMD23.  It doesn't work if we're using SDMA, though.

As for capability vs. flags, the capability is more of an inherent
property of the controller, and flags are runtime decisions on whether
to use that capability, based on e.g. the presence of a quirk.

So, I think the code's correct as written.  Feel free to ask more
questions if you're investigating a specific problem that you haven't
mentioned yet.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11  8:04     ` [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23 Anton Vorontsov
  2012-09-11  9:36       ` Huang Changming-R66093
@ 2012-09-11 18:28       ` Scott Wood
  2012-09-12  3:19         ` Huang Changming-R66093
  1 sibling, 1 reply; 23+ messages in thread
From: Scott Wood @ 2012-09-11 18:28 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: Chang-Ming.Huang, linux-mmc, linuxppc-dev

On 09/11/2012 03:04 AM, Anton Vorontsov wrote:
> On Tue, Sep 11, 2012 at 12:54:29AM -0700, Anton Vorontsov wrote:
>> On Tue, Sep 11, 2012 at 03:12:44PM +0800, Chang-Ming.Huang@freescale.com wrote:
>>> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
>>>
>>> Below SOCs don't support the cmd23 command for MMC card,
>>> therefore, disable it in device tree:
>>> P1020, P1021, P1022, P1024, P1025 and P4080
>>>
>>> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
>>
>> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
> 
> Btw, although the patch is trivial, I guess you still want to let know
> PowerPC folks about it. Adding Cc and copying the patch:
> 
> - - - -
> From: Jerry Huang <Chang-Ming.Huang@freescale.com>
> 
> Below SOCs don't support the cmd23 command for MMC card,
> therefore, disable it in device tree:
> P1020, P1021, P1022, P1024, P1025 and P4080
> 
> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> CC: Anton Vorontsov <cbouatmailru@gmail.com>
> ---
>  arch/powerpc/boot/dts/fsl/p1020si-post.dtsi |    1 +
>  arch/powerpc/boot/dts/fsl/p1021si-post.dtsi |    1 +
>  arch/powerpc/boot/dts/fsl/p1022si-post.dtsi |    1 +
>  arch/powerpc/boot/dts/fsl/p4080si-post.dtsi |    1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
> index 68cc5e7..793a30b 100644
> --- a/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p1020si-post.dtsi
> @@ -154,6 +154,7 @@
>  	sdhc@2e000 {
>  		compatible = "fsl,p1020-esdhc", "fsl,esdhc";
>  		sdhci,auto-cmd12;
> +		sdhci,no-cmd23;
>  	};
>  /include/ "pq3-sec3.3-0.dtsi"
>  
> diff --git a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
> index adb82fd..2b7fd2a 100644
> --- a/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p1021si-post.dtsi
> @@ -149,6 +149,7 @@
>  /include/ "pq3-esdhc-0.dtsi"
>  	sdhc@2e000 {
>  		sdhci,auto-cmd12;
> +		sdhci,no-cmd23;
>  	};
>  
>  /include/ "pq3-sec3.3-0.dtsi"
> diff --git a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
> index 06216b8..2334a52 100644
> --- a/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
> @@ -215,6 +215,7 @@
>  	sdhc@2e000 {
>  		compatible = "fsl,p1022-esdhc", "fsl,esdhc";
>  		sdhci,auto-cmd12;
> +		sdhci,no-cmd23;
>  	};
>  
>  /include/ "pq3-sec3.3-0.dtsi"
> diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
> index 8d35d2c..5b39952 100644
> --- a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
> @@ -337,6 +337,7 @@
>  	sdhc@114000 {
>  		voltage-ranges = <3300 3300>;
>  		sdhci,auto-cmd12;
> +		sdhci,no-cmd23;
>  	};
>  
>  /include/ "qoriq-i2c-0.dtsi"
> 

This won't help people with old device trees (forked for a custom board,
tied to an old U-Boot, etc).  The driver should infer this from the
compatible string or version registers (ideally block-specific version
registers, but if these are absent or inconclusive, SVR can be used).

-Scott

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11 14:44             ` Chris Ball
@ 2012-09-11 20:26               ` Kumar Gala
  2012-09-11 20:59                 ` Chris Ball
  0 siblings, 1 reply; 23+ messages in thread
From: Kumar Gala @ 2012-09-11 20:26 UTC (permalink / raw)
  To: Chris Ball
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov


On Sep 11, 2012, at 9:44 AM, Chris Ball wrote:

> Hi,
>=20
> On Tue, Sep 11 2012, Kumar Gala wrote:
>> In sdhci_add_host()
>>=20
>> We have the following
>>=20
>> ...
>>        mmc->caps |=3D MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE | =
MMC_CAP_CMD23;
>>=20
>>        if (host->quirks & SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12)
>>                host->flags |=3D SDHCI_AUTO_CMD12;
>>=20
>>        /* Auto-CMD23 stuff only works in ADMA or PIO. */
>>        if ((host->version >=3D SDHCI_SPEC_300) &&
>>            ((host->flags & SDHCI_USE_ADMA) ||
>>             !(host->flags & SDHCI_USE_SDMA))) {
>>                host->flags |=3D SDHCI_AUTO_CMD23;
>>                DBG("%s: Auto-CMD23 available\n", mmc_hostname(mmc));
>>        } else {
>>                DBG("%s: Auto-CMD23 unavailable\n", =
mmc_hostname(mmc));
>>        }
>>=20
>> ...
>>=20
>> I'm not clear what the difference is between mmc->caps & host->flags, =
but shouldn't we move setting MMC_CAP_CMD23 inside the 'Auto-CMD23' if =
check?
>=20
> The main answer is:  No, because CMD23 is distinct from Auto-CMD23.
>=20
> Multiblock transfers (CMD23) date back from MMC cards (which is why
> they're an MMC host capability) and can also be used in SDHCI.
>=20
> Auto-CMD23 is a new feature in SDHCI 3.0 that reduces the overhead
> of sending CMD23.  It doesn't work if we're using SDMA, though.
>=20
> As for capability vs. flags, the capability is more of an inherent
> property of the controller, and flags are runtime decisions on whether
> to use that capability, based on e.g. the presence of a quirk.
>=20
> So, I think the code's correct as written.  Feel free to ask more
> questions if you're investigating a specific problem that you haven't
> mentioned yet.

Chris,

thanks for the info.  Do you know what's required on controller side to =
handle cards that support CMD23?

I'm trying to figure out if older controller's on FSL SoCs are missing =
some feature to allow CMD23 to work (vs Auto-CMD23).


- k=

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11 20:26               ` Kumar Gala
@ 2012-09-11 20:59                 ` Chris Ball
  2012-09-12  6:18                   ` Huang Changming-R66093
  0 siblings, 1 reply; 23+ messages in thread
From: Chris Ball @ 2012-09-11 20:59 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov

Hi,

On Tue, Sep 11 2012, Kumar Gala wrote:
> thanks for the info.  Do you know what's required on controller side
> to handle cards that support CMD23?
>
> I'm trying to figure out if older controller's on FSL SoCs are missing
> some feature to allow CMD23 to work (vs Auto-CMD23).

It seems plausible that it's just not implemented on these controllers.
It's a little strange, since the command's been specified for so long
and we haven't seen any other controllers with problems.  The patch
would be correct if this is true.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11 18:28       ` Scott Wood
@ 2012-09-12  3:19         ` Huang Changming-R66093
  2012-09-12  3:38           ` Anton Vorontsov
  0 siblings, 1 reply; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-12  3:19 UTC (permalink / raw)
  To: Wood Scott-B07421, Anton Vorontsov; +Cc: linux-mmc, linuxppc-dev

DQoNCkJlc3QgUmVnYXJkcw0KSmVycnkgSHVhbmcNCg0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2Fn
ZS0tLS0tDQo+IEZyb206IFdvb2QgU2NvdHQtQjA3NDI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LCBidXQgb3RoZXIgc2ls
aWNvbmVzIGRvbid0IHN1cHBvcnQgaXQgKGUuZy4gcDQwODAsIHAxMDJ4KS4NClRob3VnaCwgdGhl
IGN1cnJlbnQgcDUvcDQvcDMgaGFzIHN1cHBvcnRlZCB0aGlzIGZlYXR1cmUsIGNhbiB3ZSBzdXJl
IHRoZSBmdXR1cmUgc2lsaWNvbiBzdXBwb3J0IGl0Pw0KU28gSSB0aGluayB0aGUgYmVzdCB3YXkg
aXMgdG8gc3BlY2lmeSBpdCBpbiBkZXZpY2UgdHJlZSBhcyAnc2RoY2ksYXV0by1jbWQxMicNCg==

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-12  3:19         ` Huang Changming-R66093
@ 2012-09-12  3:38           ` Anton Vorontsov
  2012-09-13  7:57             ` Huang Changming-R66093
  0 siblings, 1 reply; 23+ messages in thread
From: Anton Vorontsov @ 2012-09-12  3:38 UTC (permalink / raw)
  To: Huang Changming-R66093; +Cc: Wood Scott-B07421, linux-mmc, linuxppc-dev

On Wed, Sep 12, 2012 at 03:19:18AM +0000, Huang Changming-R66093 wrote:
[...]
> I don't think it is the best way to do it.  For the VVN2.2 or older,
> some silicon support this feature (mpc8536 and p2020), but other
> silicones don't support it (e.g. p4080, p102x).  Though, the current
> p5/p4/p3 has supported this feature, can we sure the future silicon
> support it?  So I think the best way is to specify it in device tree
> as 'sdhci,auto-cmd12'

In addition to your current patches, you could just add another patch
that blacklists affected SOC revisions based on the info from PVR/SVR.

For example, see gfar_detect_errata() in
drivers/net/ethernet/freescale/gianfar.c.

That way you could help users that don't have the newest device trees.

Thanks,
Anton.

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-11 20:59                 ` Chris Ball
@ 2012-09-12  6:18                   ` Huang Changming-R66093
  2012-09-12 12:13                     ` Kumar Gala
  0 siblings, 1 reply; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-12  6:18 UTC (permalink / raw)
  To: Chris Ball, Kumar Gala
  Cc: linux-mmc, linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov



Best Regards
Jerry Huang


> -----Original Message-----
> From: Chris Ball [mailto:cjb@laptop.org]
> Sent: Wednesday, September 12, 2012 4:59 AM
> To: Kumar Gala
> Cc: Huang Changming-R66093; linuxppc-dev@lists.ozlabs.org list; linux-
> mmc@vger.kernel.org; Anton Vorontsov
> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
>=20
> Hi,
>=20
> On Tue, Sep 11 2012, Kumar Gala wrote:
> > thanks for the info.  Do you know what's required on controller side
> > to handle cards that support CMD23?
> >
> > I'm trying to figure out if older controller's on FSL SoCs are missing
> > some feature to allow CMD23 to work (vs Auto-CMD23).
>=20
> It seems plausible that it's just not implemented on these controllers.
> It's a little strange, since the command's been specified for so long and
> we haven't seen any other controllers with problems.  The patch would be
> correct if this is true.
>=20

I didn't find any description about it, but after testing on FSL silicones,=
 I got this result:
Some silicones support this command, and some silicones don't support it, w=
hich will cause I/O error.

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-12  6:18                   ` Huang Changming-R66093
@ 2012-09-12 12:13                     ` Kumar Gala
  2012-09-13  2:02                       ` Huang Changming-R66093
  0 siblings, 1 reply; 23+ messages in thread
From: Kumar Gala @ 2012-09-12 12:13 UTC (permalink / raw)
  To: Huang Changming-R66093
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov


On Sep 12, 2012, at 1:18 AM, Huang Changming-R66093 wrote:

>=20
>=20
> Best Regards
> Jerry Huang
>=20
>=20
>> -----Original Message-----
>> From: Chris Ball [mailto:cjb@laptop.org]
>> Sent: Wednesday, September 12, 2012 4:59 AM
>> To: Kumar Gala
>> Cc: Huang Changming-R66093; linuxppc-dev@lists.ozlabs.org list; =
linux-
>> mmc@vger.kernel.org; Anton Vorontsov
>> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the =
CMD23
>>=20
>> Hi,
>>=20
>> On Tue, Sep 11 2012, Kumar Gala wrote:
>>> thanks for the info.  Do you know what's required on controller side
>>> to handle cards that support CMD23?
>>>=20
>>> I'm trying to figure out if older controller's on FSL SoCs are =
missing
>>> some feature to allow CMD23 to work (vs Auto-CMD23).
>>=20
>> It seems plausible that it's just not implemented on these =
controllers.
>> It's a little strange, since the command's been specified for so long =
and
>> we haven't seen any other controllers with problems.  The patch would =
be
>> correct if this is true.
>>=20
>=20
> I didn't find any description about it, but after testing on FSL =
silicones, I got this result:
> Some silicones support this command, and some silicones don't support =
it, which will cause I/O error.

Can you list out which SoCs support it and which don't.  Having this =
list will be useful in understanding which controller versions supported =
it.

- k=

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-12 12:13                     ` Kumar Gala
@ 2012-09-13  2:02                       ` Huang Changming-R66093
  2012-09-13 12:47                         ` Kumar Gala
  0 siblings, 1 reply; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-13  2:02 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov

> >
> >> -----Original Message-----
> >> From: Chris Ball [mailto:cjb@laptop.org]
> >> Sent: Wednesday, September 12, 2012 4:59 AM
> >> To: Kumar Gala
> >> Cc: Huang Changming-R66093; linuxppc-dev@lists.ozlabs.org list;
> >> linux- mmc@vger.kernel.org; Anton Vorontsov
> >> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the
> >> CMD23
> >>
> >> Hi,
> >>
> >> On Tue, Sep 11 2012, Kumar Gala wrote:
> >>> thanks for the info.  Do you know what's required on controller side
> >>> to handle cards that support CMD23?
> >>>
> >>> I'm trying to figure out if older controller's on FSL SoCs are
> >>> missing some feature to allow CMD23 to work (vs Auto-CMD23).
> >>
> >> It seems plausible that it's just not implemented on these controllers=
.
> >> It's a little strange, since the command's been specified for so long
> >> and we haven't seen any other controllers with problems.  The patch
> >> would be correct if this is true.
> >>
> >
> > I didn't find any description about it, but after testing on FSL
> silicones, I got this result:
> > Some silicones support this command, and some silicones don't support
> it, which will cause I/O error.
>=20
> Can you list out which SoCs support it and which don't.  Having this list
> will be useful in understanding which controller versions supported it.
>=20
P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, p3041) supp=
ort it.

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-12  3:38           ` Anton Vorontsov
@ 2012-09-13  7:57             ` Huang Changming-R66093
  0 siblings, 0 replies; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-13  7:57 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: Wood Scott-B07421, linux-mmc, linuxppc-dev

DQoNCkJlc3QgUmVnYXJkcw0KSmVycnkgSHVhbmcNCg0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2Fn
ZS0tLS0tDQo+IEZyb206IEFudG9uIFZvcm9udHNvdiBbbWFpbHRvOmNib3VhdG1haWxydUBnbWFp
bC5jb21dDQo+IFNlbnQ6IFdlZG5lc2RheSwgU2VwdGVtYmVyIDEyLCAyMDEyIDExOjM4IEFNDQo+
IFRvOiBIdWFuZyBDaGFuZ21pbmctUjY2MDkzDQo+IENjOiBXb29kIFNjb3R0LUIwNzQyMTsgbGlu
dXhwcGMtZGV2QGxpc3RzLm96bGFicy5vcmc7IGxpbnV4LQ0KPiBtbWNAdmdlci5rZXJuZWwub3Jn
DQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0ggMi8zXSBwb3dlcnBjL2VzZGhjOiBhZGQgcHJvcGVydHkg
dG8gZGlzYWJsZSB0aGUgQ01EMjMNCj4gDQo+IE9uIFdlZCwgU2VwI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MuDQo+IA0KSGksIEFudG9uDQpUaGFua3MuDQpCdXQsIHRo
ZXNlIHBhdGNoZXMgYXJlIGp1c3QgZm9yIGxhdGVzdCBrZXJuZWwsIGlmIHRoZSB1c2VyIGRvbid0
IGhhdmUgdGhlIGxhdGVzdCBkZXZpY2UgdHJlZSwNClRoZW4gdGhleSBkb24ndCBoYXZlIHRoZSBs
YXRlc3Qga2VybmVsLCBhbmQgdGhlc2UgcGF0Y2hlcyBjYW4ndCBiZSB1c2VkIGZvciB0aGVtIGRp
cmVjdGx5LA0KVGhvdWdoIHByb3ZpZGUgdGhlIGZ1bmN0aW9uIGxpa2UgZ2Zhcl9kZXRlY3RfZXJy
YXRhLCB0aGV5IG11c3QgbW9kaWZ5IHRoZWlyIGNvZGVzLg0KDQpBbmQgSSBkb24ndCBrbm93IGlm
IHRoZSBmdXR1cmUgc2lsaWNvbiBjYW4gc3VwcG9ydCBDTUQyMywgaWYgbm90LCB3ZSBtdXN0IG1v
ZGlmeSBzZGhjIGRyaXZlciBhZ2Fpbi4NCldoZW4gd2UgdXNlIHRoZSBkZXZpY2UgdHJlZSB0byBp
ZGVudGlmeSBpdCwgaWYgdGhlIHNpbGljb24gZG9lcyBub3Qgc3VwcG9ydCB0aGlzIGZlYXR1cmUs
DQp3ZSBqdXN0IGFkZCB0aGlzIHByb3BlcnR5IGludG8gdGhlIG5ldyBkZXZpY2UgdHJlZSwgbm90
IG5lZWQgdG8gbW9kaWZ5IFNESEMgZHJpdmVyLg0KSSB0aGluaywgdGhpcyBpcyB0aGUgYmVzdCB3
YXkuDQogDQoNCg==

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-13  2:02                       ` Huang Changming-R66093
@ 2012-09-13 12:47                         ` Kumar Gala
  2012-09-14  2:02                           ` Huang Changming-R66093
  2012-09-17 12:36                           ` Chris Ball
  0 siblings, 2 replies; 23+ messages in thread
From: Kumar Gala @ 2012-09-13 12:47 UTC (permalink / raw)
  To: Huang Changming-R66093
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov


On Sep 12, 2012, at 9:02 PM, Huang Changming-R66093 wrote:

>>>=20
>>>> -----Original Message-----
>>>> From: Chris Ball [mailto:cjb@laptop.org]
>>>> Sent: Wednesday, September 12, 2012 4:59 AM
>>>> To: Kumar Gala
>>>> Cc: Huang Changming-R66093; linuxppc-dev@lists.ozlabs.org list;
>>>> linux- mmc@vger.kernel.org; Anton Vorontsov
>>>> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the
>>>> CMD23
>>>>=20
>>>> Hi,
>>>>=20
>>>> On Tue, Sep 11 2012, Kumar Gala wrote:
>>>>> thanks for the info.  Do you know what's required on controller =
side
>>>>> to handle cards that support CMD23?
>>>>>=20
>>>>> I'm trying to figure out if older controller's on FSL SoCs are
>>>>> missing some feature to allow CMD23 to work (vs Auto-CMD23).
>>>>=20
>>>> It seems plausible that it's just not implemented on these =
controllers.
>>>> It's a little strange, since the command's been specified for so =
long
>>>> and we haven't seen any other controllers with problems.  The patch
>>>> would be correct if this is true.
>>>>=20
>>>=20
>>> I didn't find any description about it, but after testing on FSL
>> silicones, I got this result:
>>> Some silicones support this command, and some silicones don't =
support
>> it, which will cause I/O error.
>>=20
>> Can you list out which SoCs support it and which don't.  Having this =
list
>> will be useful in understanding which controller versions supported =
it.
>>=20
> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, p3041) =
support it.

Based on this, why don't we use the HOSTVER register to detect instead =
of device tree:


#define FSL_SDHC_VER_1_0	0x00
#define FSL_SDHC_VER_1_1	0x01
#define FSL_SDHC_VER_2_0	0x10
#define FSL_SDHC_VER_2_1	0x11
#define FSL_SDHC_VER_2_2	0x12
#define FSL_SDHC_VER_2_3	0x13

unsigned int vendor_version;

vendor_version =3D sdhci_readw(host, SDHCI_HOST_VERSION);
vendor_version =3D (vendor_version & SDHCI_VENDOR_VER_MASK) >> =
SDHCI_VENDOR_VER_SHIFT;

if ((vendor_version =3D=3D FSL_SDHC_VER_1_1) || (vendor_version =3D=3D =
FSL_SDHC_VER_2_2))
	host->quirks2 |=3D SDHCI_QUIRK2_HOST_NO_CMD23;

- k

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-13 12:47                         ` Kumar Gala
@ 2012-09-14  2:02                           ` Huang Changming-R66093
  2012-09-14 12:40                             ` Kumar Gala
  2012-09-17 12:36                           ` Chris Ball
  1 sibling, 1 reply; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-14  2:02 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov



Best Regards
Jerry Huang


> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Thursday, September 13, 2012 8:48 PM
> To: Huang Changming-R66093
> Cc: Chris Ball; linuxppc-dev@lists.ozlabs.org list; linux-
> mmc@vger.kernel.org; Anton Vorontsov
> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
>=20
>=20
> On Sep 12, 2012, at 9:02 PM, Huang Changming-R66093 wrote:
>=20
> >>>
> >>>> -----Original Message-----
> >>>> From: Chris Ball [mailto:cjb@laptop.org]
> >>>> Sent: Wednesday, September 12, 2012 4:59 AM
> >>>> To: Kumar Gala
> >>>> Cc: Huang Changming-R66093; linuxppc-dev@lists.ozlabs.org list;
> >>>> linux- mmc@vger.kernel.org; Anton Vorontsov
> >>>> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable the
> >>>> CMD23
> >>>>
> >>>> Hi,
> >>>>
> >>>> On Tue, Sep 11 2012, Kumar Gala wrote:
> >>>>> thanks for the info.  Do you know what's required on controller
> >>>>> side to handle cards that support CMD23?
> >>>>>
> >>>>> I'm trying to figure out if older controller's on FSL SoCs are
> >>>>> missing some feature to allow CMD23 to work (vs Auto-CMD23).
> >>>>
> >>>> It seems plausible that it's just not implemented on these
> controllers.
> >>>> It's a little strange, since the command's been specified for so
> >>>> long and we haven't seen any other controllers with problems.  The
> >>>> patch would be correct if this is true.
> >>>>
> >>>
> >>> I didn't find any description about it, but after testing on FSL
> >> silicones, I got this result:
> >>> Some silicones support this command, and some silicones don't
> >>> support
> >> it, which will cause I/O error.
> >>
> >> Can you list out which SoCs support it and which don't.  Having this
> >> list will be useful in understanding which controller versions
> supported it.
> >>
> > P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
> > Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, p3041)
> support it.
>=20
> Based on this, why don't we use the HOSTVER register to detect instead of
> device tree:
>=20
>=20
> #define FSL_SDHC_VER_1_0	0x00
> #define FSL_SDHC_VER_1_1	0x01
> #define FSL_SDHC_VER_2_0	0x10
> #define FSL_SDHC_VER_2_1	0x11
> #define FSL_SDHC_VER_2_2	0x12
> #define FSL_SDHC_VER_2_3	0x13
>=20
> unsigned int vendor_version;
>=20
> vendor_version =3D sdhci_readw(host, SDHCI_HOST_VERSION); vendor_version =
=3D
> (vendor_version & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;
>=20
> if ((vendor_version =3D=3D FSL_SDHC_VER_1_1) || (vendor_version =3D=3D
> FSL_SDHC_VER_2_2))
> 	host->quirks2 |=3D SDHCI_QUIRK2_HOST_NO_CMD23;
>=20

I once thought about it, but if the future silicon does not support this fe=
ature,
then we continue to modify these codes for new silicon?

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-14  2:02                           ` Huang Changming-R66093
@ 2012-09-14 12:40                             ` Kumar Gala
  0 siblings, 0 replies; 23+ messages in thread
From: Kumar Gala @ 2012-09-14 12:40 UTC (permalink / raw)
  To: Huang Changming-R66093
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov

>>>>>=20
>>>>>> -----Original Message-----
>>>>>> From: Chris Ball [mailto:cjb@laptop.org]
>>>>>> Sent: Wednesday, September 12, 2012 4:59 AM
>>>>>> To: Kumar Gala
>>>>>> Cc: Huang Changming-R66093; linuxppc-dev@lists.ozlabs.org list;
>>>>>> linux- mmc@vger.kernel.org; Anton Vorontsov
>>>>>> Subject: Re: [PATCH 2/3] powerpc/esdhc: add property to disable =
the
>>>>>> CMD23
>>>>>>=20
>>>>>> Hi,
>>>>>>=20
>>>>>> On Tue, Sep 11 2012, Kumar Gala wrote:
>>>>>>> thanks for the info.  Do you know what's required on controller
>>>>>>> side to handle cards that support CMD23?
>>>>>>>=20
>>>>>>> I'm trying to figure out if older controller's on FSL SoCs are
>>>>>>> missing some feature to allow CMD23 to work (vs Auto-CMD23).
>>>>>>=20
>>>>>> It seems plausible that it's just not implemented on these
>> controllers.
>>>>>> It's a little strange, since the command's been specified for so
>>>>>> long and we haven't seen any other controllers with problems.  =
The
>>>>>> patch would be correct if this is true.
>>>>>>=20
>>>>>=20
>>>>> I didn't find any description about it, but after testing on FSL
>>>> silicones, I got this result:
>>>>> Some silicones support this command, and some silicones don't
>>>>> support
>>>> it, which will cause I/O error.
>>>>=20
>>>> Can you list out which SoCs support it and which don't.  Having =
this
>>>> list will be useful in understanding which controller versions
>> supported it.
>>>>=20
>>> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
>>> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, =
p3041)
>> support it.
>>=20
>> Based on this, why don't we use the HOSTVER register to detect =
instead of
>> device tree:
>>=20
>>=20
>> #define FSL_SDHC_VER_1_0	0x00
>> #define FSL_SDHC_VER_1_1	0x01
>> #define FSL_SDHC_VER_2_0	0x10
>> #define FSL_SDHC_VER_2_1	0x11
>> #define FSL_SDHC_VER_2_2	0x12
>> #define FSL_SDHC_VER_2_3	0x13
>>=20
>> unsigned int vendor_version;
>>=20
>> vendor_version =3D sdhci_readw(host, SDHCI_HOST_VERSION); =
vendor_version =3D
>> (vendor_version & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT;
>>=20
>> if ((vendor_version =3D=3D FSL_SDHC_VER_1_1) || (vendor_version =3D=3D
>> FSL_SDHC_VER_2_2))
>> 	host->quirks2 |=3D SDHCI_QUIRK2_HOST_NO_CMD23;
>>=20
>=20
> I once thought about it, but if the future silicon does not support =
this feature,
> then we continue to modify these codes for new silicon?

Yes, but it seems extremely unlikely that future versions of the =
controller will remove this feature now that it exists.

- k=

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-13 12:47                         ` Kumar Gala
  2012-09-14  2:02                           ` Huang Changming-R66093
@ 2012-09-17 12:36                           ` Chris Ball
  2012-09-17 13:12                             ` Kumar Gala
  1 sibling, 1 reply; 23+ messages in thread
From: Chris Ball @ 2012-09-17 12:36 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov

Hi,

On Thu, Sep 13 2012, Kumar Gala wrote:
>>> Can you list out which SoCs support it and which don't.  Having this list
>>> will be useful in understanding which controller versions supported it.
>>> 
>> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
>> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, p3041) support it.
>
> Based on this, why don't we use the HOSTVER register to detect instead of device tree:

I've got a mild preference for handling quirk assignment in the DT
rather than in driver code, so I'd prefer to just push the original
patch to mmc-next as-is.  Does that sound okay?

(I think the argument that there isn't going to be any new hardware
with this problem is equally in favor of both methods.)

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-17 12:36                           ` Chris Ball
@ 2012-09-17 13:12                             ` Kumar Gala
  2012-09-17 13:45                               ` Chris Ball
  2012-09-18  1:09                               ` Huang Changming-R66093
  0 siblings, 2 replies; 23+ messages in thread
From: Kumar Gala @ 2012-09-17 13:12 UTC (permalink / raw)
  To: Chris Ball
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov


On Sep 17, 2012, at 7:36 AM, Chris Ball wrote:

> Hi,
>=20
> On Thu, Sep 13 2012, Kumar Gala wrote:
>>>> Can you list out which SoCs support it and which don't.  Having =
this list
>>>> will be useful in understanding which controller versions supported =
it.
>>>>=20
>>> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
>>> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, =
p3041) support it.
>>=20
>> Based on this, why don't we use the HOSTVER register to detect =
instead of device tree:
>=20
> I've got a mild preference for handling quirk assignment in the DT
> rather than in driver code, so I'd prefer to just push the original
> patch to mmc-next as-is.  Does that sound okay?

Why?  I only ask because I agree with Scott that this means you have to =
update your device tree to get proper functionality.

> (I think the argument that there isn't going to be any new hardware
> with this problem is equally in favor of both methods.)

- k=

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-17 13:12                             ` Kumar Gala
@ 2012-09-17 13:45                               ` Chris Ball
  2012-09-18  1:09                               ` Huang Changming-R66093
  1 sibling, 0 replies; 23+ messages in thread
From: Chris Ball @ 2012-09-17 13:45 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov

Hi,

On Mon, Sep 17 2012, Kumar Gala wrote:
>>>> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
>>>> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, p3041) support it.
>>> 
>>> Based on this, why don't we use the HOSTVER register to detect instead of device tree:
>> 
>> I've got a mild preference for handling quirk assignment in the DT
>> rather than in driver code, so I'd prefer to just push the original
>> patch to mmc-next as-is.  Does that sound okay?
>
> Why?  I only ask because I agree with Scott that this means you have to update your device tree to get proper functionality.

Thanks, I'd missed that.  I withdraw my preference; I'll pick up
whichever method you all prefer.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

* RE: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-17 13:12                             ` Kumar Gala
  2012-09-17 13:45                               ` Chris Ball
@ 2012-09-18  1:09                               ` Huang Changming-R66093
  2012-09-18  5:00                                 ` Kumar Gala
  1 sibling, 1 reply; 23+ messages in thread
From: Huang Changming-R66093 @ 2012-09-18  1:09 UTC (permalink / raw)
  To: Kumar Gala, Chris Ball
  Cc: linux-mmc, linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov

> On Sep 17, 2012, at 7:36 AM, Chris Ball wrote:
>=20
> > Hi,
> >
> > On Thu, Sep 13 2012, Kumar Gala wrote:
> >>>> Can you list out which SoCs support it and which don't.  Having
> >>>> this list will be useful in understanding which controller versions
> supported it.
> >>>>
> >>> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
> >>> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, p3041=
)
> support it.
> >>
> >> Based on this, why don't we use the HOSTVER register to detect instead
> of device tree:
> >
> > I've got a mild preference for handling quirk assignment in the DT
> > rather than in driver code, so I'd prefer to just push the original
> > patch to mmc-next as-is.  Does that sound okay?
>=20
> Why?  I only ask because I agree with Scott that this means you have to
> update your device tree to get proper functionality.
>=20
When the new silicon does not support CMD23,
if we don't update the device tree, then we must update the SDHC driver.
I prefer to add the property in device tree,
because we just add this property in new device tree, we don't need more ef=
fort to modify driver.

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-18  1:09                               ` Huang Changming-R66093
@ 2012-09-18  5:00                                 ` Kumar Gala
  2012-09-18  5:07                                   ` Chris Ball
  0 siblings, 1 reply; 23+ messages in thread
From: Kumar Gala @ 2012-09-18  5:00 UTC (permalink / raw)
  To: Huang Changming-R66093
  Cc: linux-mmc, Chris Ball, linuxppc-dev@lists.ozlabs.org list,
	Anton Vorontsov


On Sep 17, 2012, at 8:09 PM, Huang Changming-R66093 wrote:

>> On Sep 17, 2012, at 7:36 AM, Chris Ball wrote:
>>=20
>>> Hi,
>>>=20
>>> On Thu, Sep 13 2012, Kumar Gala wrote:
>>>>>> Can you list out which SoCs support it and which don't.  Having
>>>>>> this list will be useful in understanding which controller =
versions
>> supported it.
>>>>>>=20
>>>>> P1020, p1021, p1022, p1024, p1015 and p4080 can't support it.
>>>>> Mpc8536, p2020, and the other current DPAA silicon (e.g. p5020, =
p3041)
>> support it.
>>>>=20
>>>> Based on this, why don't we use the HOSTVER register to detect =
instead
>> of device tree:
>>>=20
>>> I've got a mild preference for handling quirk assignment in the DT
>>> rather than in driver code, so I'd prefer to just push the original
>>> patch to mmc-next as-is.  Does that sound okay?
>>=20
>> Why?  I only ask because I agree with Scott that this means you have =
to
>> update your device tree to get proper functionality.
>>=20
> When the new silicon does not support CMD23,
> if we don't update the device tree, then we must update the SDHC =
driver.
> I prefer to add the property in device tree,
> because we just add this property in new device tree, we don't need =
more effort to modify driver.
>=20

Jerry,

I think doing it driver makes more sense because:

1. means older device tree's still work
2. odds that CMD23 not being supported in future devices is near 0%
   (Now that we support AutoCMD23 [and thus CMD23] we aren't likely to =
stop supporting it in future)
3. If IP changes you are going to have to update driver anyways for new =
features

I really think we should NOT utilize device tree for this.

- k

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

* Re: [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23
  2012-09-18  5:00                                 ` Kumar Gala
@ 2012-09-18  5:07                                   ` Chris Ball
  0 siblings, 0 replies; 23+ messages in thread
From: Chris Ball @ 2012-09-18  5:07 UTC (permalink / raw)
  To: Kumar Gala
  Cc: linux-mmc, Huang Changming-R66093,
	linuxppc-dev@lists.ozlabs.org list, Anton Vorontsov

Hi,

On Tue, Sep 18 2012, Kumar Gala wrote:
>>>> I've got a mild preference for handling quirk assignment in the DT
>>>> rather than in driver code, so I'd prefer to just push the original
>>>> patch to mmc-next as-is.  Does that sound okay?
>>> 
>>> Why?  I only ask because I agree with Scott that this means you have to
>>> update your device tree to get proper functionality.
>>> 
>> When the new silicon does not support CMD23,
>> if we don't update the device tree, then we must update the SDHC driver.
>> I prefer to add the property in device tree,
>> because we just add this property in new device tree, we don't need more effort to modify driver.
>
> Jerry,
>
> I think doing it driver makes more sense because:
>
> 1. means older device tree's still work
> 2. odds that CMD23 not being supported in future devices is near 0%
>    (Now that we support AutoCMD23 [and thus CMD23] we aren't likely to stop supporting it in future)
> 3. If IP changes you are going to have to update driver anyways for new features
>
> I really think we should NOT utilize device tree for this.

Of course, we could also make both (or perhaps neither) of you happy by
merging both:  if your DT says you don't support cmd23 *or* you hit the
driver's blacklist, we avoid it.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

end of thread, other threads:[~2012-09-18  5:07 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1347347565-17474-1-git-send-email-Chang-Ming.Huang@freescale.com>
     [not found] ` <1347347565-17474-2-git-send-email-Chang-Ming.Huang@freescale.com>
     [not found]   ` <20120911075429.GA27028@lizard>
2012-09-11  8:04     ` [PATCH 2/3] powerpc/esdhc: add property to disable the CMD23 Anton Vorontsov
2012-09-11  9:36       ` Huang Changming-R66093
2012-09-11 12:43         ` Kumar Gala
2012-09-11 12:49           ` Kumar Gala
2012-09-11 14:44             ` Chris Ball
2012-09-11 20:26               ` Kumar Gala
2012-09-11 20:59                 ` Chris Ball
2012-09-12  6:18                   ` Huang Changming-R66093
2012-09-12 12:13                     ` Kumar Gala
2012-09-13  2:02                       ` Huang Changming-R66093
2012-09-13 12:47                         ` Kumar Gala
2012-09-14  2:02                           ` Huang Changming-R66093
2012-09-14 12:40                             ` Kumar Gala
2012-09-17 12:36                           ` Chris Ball
2012-09-17 13:12                             ` Kumar Gala
2012-09-17 13:45                               ` Chris Ball
2012-09-18  1:09                               ` Huang Changming-R66093
2012-09-18  5:00                                 ` Kumar Gala
2012-09-18  5:07                                   ` Chris Ball
2012-09-11 18:28       ` Scott Wood
2012-09-12  3:19         ` Huang Changming-R66093
2012-09-12  3:38           ` Anton Vorontsov
2012-09-13  7:57             ` Huang Changming-R66093

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).