Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-22 Thread Jean-Michel Hautbois
2014-09-21 19:48 GMT+02:00 Pavel Machek :
> On Mon 2014-09-15 19:44:28, Jaehoon Chung wrote:
>> On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
>> > Hi Jaehoon,
>> >
>> >> On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
>> >>> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
>> >>> Without this patch, I/O errors occur.
>> >>> This eMMC seems to have a different Manufacturer ID as it reads 0x45
>> >>> and not 0x2 as specified in datasheet.
>> >>
>> >> I think this patch don't merge into mainline.
>> >> This is not solution for problem.
>> >> you mentioned the below comment, this is workaround.
>> >
>> > Yes
>> >
>> >>>
>> >>> Signed-off-by: Jean-Michel Hautbois 
>> >>> ---
>> >>>  drivers/mmc/core/mmc_ops.c | 9 +
>> >>>  1 file changed, 9 insertions(+)
>> >>>
>> >>> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
>> >>> index f51b5ba..91babaa 100644
>> >>> --- a/drivers/mmc/core/mmc_ops.c
>> >>> +++ b/drivers/mmc/core/mmc_ops.c
>> >>> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
>> >>> index, u8 value,
>> >>>   if (!use_busy_signal)
>> >>>   return 0;
>> >>>
>> >>> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
>> >>> +  * before sending CMD13 after CMD6
>> >>> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
>> >>> datasheet
>> >>> +  */
>> >>> + if (card->cid.manfid == CID_MANFID_SANDISK ||
>> >>> + card->cid.manfid == 0x45) {
>> >>> + msleep(1);
>> >>> + }
>> >>
>> >> If it's a general problem of Sandisk SDIN5D1-2G,
>> >> I think you need to verify this problem. And can you use the MMC_FIXUP() 
>> >> and QUIRK?
>> >
>> > Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
>> > have this MANFID different from what is defined by CID_MANFID_SANDISK.
>> > How should I use MMC_FIXUP ? Like this ?
>>
>> I think you need to explain why delay is need.
>> i didn't have same card, but it might be your host controller or other 
>> problem.
>
> Datasheet says it is needed, so we need to do the delay.
>
> Adding pointer to the datasheet (page, chapter) to the comment might be good 
> idea.

I can't find the page saying a delay must be added... Can you point me
to the correct line ?
BTW, the MANFID is 0x45 on SDIN*-L parts. I will add a comment for this too.

JM
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-22 Thread Jean-Michel Hautbois
2014-09-21 19:48 GMT+02:00 Pavel Machek pa...@ucw.cz:
 On Mon 2014-09-15 19:44:28, Jaehoon Chung wrote:
 On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
  Hi Jaehoon,
 
  On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
  Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
  Without this patch, I/O errors occur.
  This eMMC seems to have a different Manufacturer ID as it reads 0x45
  and not 0x2 as specified in datasheet.
 
  I think this patch don't merge into mainline.
  This is not solution for problem.
  you mentioned the below comment, this is workaround.
 
  Yes
 
 
  Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
  ---
   drivers/mmc/core/mmc_ops.c | 9 +
   1 file changed, 9 insertions(+)
 
  diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
  index f51b5ba..91babaa 100644
  --- a/drivers/mmc/core/mmc_ops.c
  +++ b/drivers/mmc/core/mmc_ops.c
  @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
  index, u8 value,
if (!use_busy_signal)
return 0;
 
  + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
  +  * before sending CMD13 after CMD6
  +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
  datasheet
  +  */
  + if (card-cid.manfid == CID_MANFID_SANDISK ||
  + card-cid.manfid == 0x45) {
  + msleep(1);
  + }
 
  If it's a general problem of Sandisk SDIN5D1-2G,
  I think you need to verify this problem. And can you use the MMC_FIXUP() 
  and QUIRK?
 
  Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
  have this MANFID different from what is defined by CID_MANFID_SANDISK.
  How should I use MMC_FIXUP ? Like this ?

 I think you need to explain why delay is need.
 i didn't have same card, but it might be your host controller or other 
 problem.

 Datasheet says it is needed, so we need to do the delay.

 Adding pointer to the datasheet (page, chapter) to the comment might be good 
 idea.

I can't find the page saying a delay must be added... Can you point me
to the correct line ?
BTW, the MANFID is 0x45 on SDIN*-L parts. I will add a comment for this too.

JM
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-21 Thread Jaehoon Chung
Hi,

On 09/22/2014 02:48 AM, Pavel Machek wrote:
> On Mon 2014-09-15 19:44:28, Jaehoon Chung wrote:
>> On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
>>> Hi Jaehoon,
>>>
 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
> Without this patch, I/O errors occur.
> This eMMC seems to have a different Manufacturer ID as it reads 0x45
> and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.
>>>
>>> Yes
>>>
>
> Signed-off-by: Jean-Michel Hautbois 
> ---
>  drivers/mmc/core/mmc_ops.c | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index f51b5ba..91babaa 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
> index, u8 value,
>   if (!use_busy_signal)
>   return 0;
>
> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
> +  * before sending CMD13 after CMD6
> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
> datasheet
> +  */
> + if (card->cid.manfid == CID_MANFID_SANDISK ||
> + card->cid.manfid == 0x45) {
> + msleep(1);
> + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() 
 and QUIRK?
>>>
>>> Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
>>> have this MANFID different from what is defined by CID_MANFID_SANDISK.
>>> How should I use MMC_FIXUP ? Like this ?
>>
>> I think you need to explain why delay is need.
>> i didn't have same card, but it might be your host controller or other 
>> problem. 
> 
> Datasheet says it is needed, so we need to do the delay.
> 
> Adding pointer to the datasheet (page, chapter) to the comment might be good 
> idea.

It's good. Then i think good that it will add the delay with the MMC_FIXUP and 
QUIRK.

Best Regards,
Jaehoon Chung

> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-21 Thread Pavel Machek
On Mon 2014-09-15 19:44:28, Jaehoon Chung wrote:
> On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
> > Hi Jaehoon,
> > 
> >> On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
> >>> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
> >>> Without this patch, I/O errors occur.
> >>> This eMMC seems to have a different Manufacturer ID as it reads 0x45
> >>> and not 0x2 as specified in datasheet.
> >>
> >> I think this patch don't merge into mainline.
> >> This is not solution for problem.
> >> you mentioned the below comment, this is workaround.
> > 
> > Yes
> > 
> >>>
> >>> Signed-off-by: Jean-Michel Hautbois 
> >>> ---
> >>>  drivers/mmc/core/mmc_ops.c | 9 +
> >>>  1 file changed, 9 insertions(+)
> >>>
> >>> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> >>> index f51b5ba..91babaa 100644
> >>> --- a/drivers/mmc/core/mmc_ops.c
> >>> +++ b/drivers/mmc/core/mmc_ops.c
> >>> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
> >>> index, u8 value,
> >>>   if (!use_busy_signal)
> >>>   return 0;
> >>>
> >>> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
> >>> +  * before sending CMD13 after CMD6
> >>> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
> >>> datasheet
> >>> +  */
> >>> + if (card->cid.manfid == CID_MANFID_SANDISK ||
> >>> + card->cid.manfid == 0x45) {
> >>> + msleep(1);
> >>> + }
> >>
> >> If it's a general problem of Sandisk SDIN5D1-2G,
> >> I think you need to verify this problem. And can you use the MMC_FIXUP() 
> >> and QUIRK?
> > 
> > Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
> > have this MANFID different from what is defined by CID_MANFID_SANDISK.
> > How should I use MMC_FIXUP ? Like this ?
> 
> I think you need to explain why delay is need.
> i didn't have same card, but it might be your host controller or other 
> problem. 

Datasheet says it is needed, so we need to do the delay.

Adding pointer to the datasheet (page, chapter) to the comment might be good 
idea.


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-21 Thread Pavel Machek
On Mon 2014-09-15 19:44:28, Jaehoon Chung wrote:
 On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
  Hi Jaehoon,
  
  On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
  Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
  Without this patch, I/O errors occur.
  This eMMC seems to have a different Manufacturer ID as it reads 0x45
  and not 0x2 as specified in datasheet.
 
  I think this patch don't merge into mainline.
  This is not solution for problem.
  you mentioned the below comment, this is workaround.
  
  Yes
  
 
  Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
  ---
   drivers/mmc/core/mmc_ops.c | 9 +
   1 file changed, 9 insertions(+)
 
  diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
  index f51b5ba..91babaa 100644
  --- a/drivers/mmc/core/mmc_ops.c
  +++ b/drivers/mmc/core/mmc_ops.c
  @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
  index, u8 value,
if (!use_busy_signal)
return 0;
 
  + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
  +  * before sending CMD13 after CMD6
  +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
  datasheet
  +  */
  + if (card-cid.manfid == CID_MANFID_SANDISK ||
  + card-cid.manfid == 0x45) {
  + msleep(1);
  + }
 
  If it's a general problem of Sandisk SDIN5D1-2G,
  I think you need to verify this problem. And can you use the MMC_FIXUP() 
  and QUIRK?
  
  Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
  have this MANFID different from what is defined by CID_MANFID_SANDISK.
  How should I use MMC_FIXUP ? Like this ?
 
 I think you need to explain why delay is need.
 i didn't have same card, but it might be your host controller or other 
 problem. 

Datasheet says it is needed, so we need to do the delay.

Adding pointer to the datasheet (page, chapter) to the comment might be good 
idea.


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-21 Thread Jaehoon Chung
Hi,

On 09/22/2014 02:48 AM, Pavel Machek wrote:
 On Mon 2014-09-15 19:44:28, Jaehoon Chung wrote:
 On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
 Hi Jaehoon,

 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.

 Yes


 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
 datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() 
 and QUIRK?

 Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
 have this MANFID different from what is defined by CID_MANFID_SANDISK.
 How should I use MMC_FIXUP ? Like this ?

 I think you need to explain why delay is need.
 i didn't have same card, but it might be your host controller or other 
 problem. 
 
 Datasheet says it is needed, so we need to do the delay.
 
 Adding pointer to the datasheet (page, chapter) to the comment might be good 
 idea.

It's good. Then i think good that it will add the delay with the MMC_FIXUP and 
QUIRK.

Best Regards,
Jaehoon Chung

 
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread hisanao.kinkawa
Hi

Do not hit the following bug?
Often, This bug fails setting of CMD6.

 Original Message 
Subject:Re: [PATCH v2] mmc:sdhci: handle busy-end interrupt during 
command
Date:   Tue, 2 Sep 2014 11:27:51 +0200
From:   Ulf Hansson 
To: Chanho Min 



On 30 August 2014 05:40, Chanho Min  wrote:
> It is fully legal for a controller to start handling busy-end interrupt
> before it has signaled that the command has completed. So make sure
> we do things in the proper order, Or it results that command interrupt
> is ignored so it can cause unexpected operations. This is founded at some
> toshiba emmc with the bellow warning.
>
> "mmc0: Got command interrupt 0x0001 even though
> no command operation was in progress."
>
> This issue has been also reported by Youssef TRIKI:
> It is not specific to Toshiba devices, and happens with eMMC devices
> as well as SD card which support Auto-CMD12 rather than CMD23.
>
> Also, similar patch is submitted by:
> Gwendal Grignou 
>
> Changes since v1:
>  Fixed conflict with the next of git.linaro.org/people/ulf.hansson/mmc.git
>  and Tested if issue is fixed again.
>
> Signed-off-by: Hankyung Yu 
> Signed-off-by: Chanho Min 
> Tested-by: Youssef TRIKI 

Best Regards,
===
Hisanao Kinkawa  [hisanao.kink...@toshiba.co.jp 
]
===


(2014/09/15 20:29), Jean-Michel Hautbois wrote:
> 2014-09-15 12:53 GMT+02:00 Jean-Michel Hautbois
> :
>> 2014-09-15 12:44 GMT+02:00 Jaehoon Chung :
>>> On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
 Hi Jaehoon,

> On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
>> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
>> Without this patch, I/O errors occur.
>> This eMMC seems to have a different Manufacturer ID as it reads 0x45
>> and not 0x2 as specified in datasheet.
> I think this patch don't merge into mainline.
> This is not solution for problem.
> you mentioned the below comment, this is workaround.
 Yes

>> Signed-off-by: Jean-Michel Hautbois 
>> ---
>>   drivers/mmc/core/mmc_ops.c | 9 +
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
>> index f51b5ba..91babaa 100644
>> --- a/drivers/mmc/core/mmc_ops.c
>> +++ b/drivers/mmc/core/mmc_ops.c
>> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
>> index, u8 value,
>>if (!use_busy_signal)
>>return 0;
>>
>> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
>> +  * before sending CMD13 after CMD6
>> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
>> datasheet
>> +  */
>> + if (card->cid.manfid == CID_MANFID_SANDISK ||
>> + card->cid.manfid == 0x45) {
>> + msleep(1);
>> + }
> If it's a general problem of Sandisk SDIN5D1-2G,
> I think you need to verify this problem. And can you use the MMC_FIXUP() 
> and QUIRK?
 Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
 have this MANFID different from what is defined by CID_MANFID_SANDISK.
 How should I use MMC_FIXUP ? Like this ?
>>> I think you need to explain why delay is need.
>>> i didn't have same card, but it might be your host controller or other 
>>> problem.
>> Well, I don't know why it is needed, this is undocumented, nothing in
>> datasheet explains anything about this.
> It seems to be uSDHC / DDR mode related. I don't even know if this is
> limited to Sandisk !
> And I don't have another board with another manufacturer eMMC to test.
> Maybe some guys from Freescale could help with this ?
>
> Thanks,
> JM
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
>



Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jean-Michel Hautbois
2014-09-15 12:53 GMT+02:00 Jean-Michel Hautbois
:
> 2014-09-15 12:44 GMT+02:00 Jaehoon Chung :
>> On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
>>> Hi Jaehoon,
>>>
 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
> Without this patch, I/O errors occur.
> This eMMC seems to have a different Manufacturer ID as it reads 0x45
> and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.
>>>
>>> Yes
>>>
>
> Signed-off-by: Jean-Michel Hautbois 
> ---
>  drivers/mmc/core/mmc_ops.c | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index f51b5ba..91babaa 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
> index, u8 value,
>   if (!use_busy_signal)
>   return 0;
>
> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
> +  * before sending CMD13 after CMD6
> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
> datasheet
> +  */
> + if (card->cid.manfid == CID_MANFID_SANDISK ||
> + card->cid.manfid == 0x45) {
> + msleep(1);
> + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() 
 and QUIRK?
>>>
>>> Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
>>> have this MANFID different from what is defined by CID_MANFID_SANDISK.
>>> How should I use MMC_FIXUP ? Like this ?
>>
>> I think you need to explain why delay is need.
>> i didn't have same card, but it might be your host controller or other 
>> problem.
>
> Well, I don't know why it is needed, this is undocumented, nothing in
> datasheet explains anything about this.

It seems to be uSDHC / DDR mode related. I don't even know if this is
limited to Sandisk !
And I don't have another board with another manufacturer eMMC to test.
Maybe some guys from Freescale could help with this ?

Thanks,
JM
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jean-Michel Hautbois
2014-09-15 12:44 GMT+02:00 Jaehoon Chung :
> On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
>> Hi Jaehoon,
>>
>>> On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.
>>>
>>> I think this patch don't merge into mainline.
>>> This is not solution for problem.
>>> you mentioned the below comment, this is workaround.
>>
>> Yes
>>

 Signed-off-by: Jean-Michel Hautbois 
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
 +  */
 + if (card->cid.manfid == CID_MANFID_SANDISK ||
 + card->cid.manfid == 0x45) {
 + msleep(1);
 + }
>>>
>>> If it's a general problem of Sandisk SDIN5D1-2G,
>>> I think you need to verify this problem. And can you use the MMC_FIXUP() 
>>> and QUIRK?
>>
>> Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
>> have this MANFID different from what is defined by CID_MANFID_SANDISK.
>> How should I use MMC_FIXUP ? Like this ?
>
> I think you need to explain why delay is need.
> i didn't have same card, but it might be your host controller or other 
> problem.

Well, I don't know why it is needed, this is undocumented, nothing in
datasheet explains anything about this.

JM
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jaehoon Chung
On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
> Hi Jaehoon,
> 
>> On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
>>> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
>>> Without this patch, I/O errors occur.
>>> This eMMC seems to have a different Manufacturer ID as it reads 0x45
>>> and not 0x2 as specified in datasheet.
>>
>> I think this patch don't merge into mainline.
>> This is not solution for problem.
>> you mentioned the below comment, this is workaround.
> 
> Yes
> 
>>>
>>> Signed-off-by: Jean-Michel Hautbois 
>>> ---
>>>  drivers/mmc/core/mmc_ops.c | 9 +
>>>  1 file changed, 9 insertions(+)
>>>
>>> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
>>> index f51b5ba..91babaa 100644
>>> --- a/drivers/mmc/core/mmc_ops.c
>>> +++ b/drivers/mmc/core/mmc_ops.c
>>> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
>>> index, u8 value,
>>>   if (!use_busy_signal)
>>>   return 0;
>>>
>>> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
>>> +  * before sending CMD13 after CMD6
>>> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
>>> +  */
>>> + if (card->cid.manfid == CID_MANFID_SANDISK ||
>>> + card->cid.manfid == 0x45) {
>>> + msleep(1);
>>> + }
>>
>> If it's a general problem of Sandisk SDIN5D1-2G,
>> I think you need to verify this problem. And can you use the MMC_FIXUP() and 
>> QUIRK?
> 
> Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
> have this MANFID different from what is defined by CID_MANFID_SANDISK.
> How should I use MMC_FIXUP ? Like this ?

I think you need to explain why delay is need.
i didn't have same card, but it might be your host controller or other problem. 

You can define the 0x45 with other naming.
ex) CID_MANFID_SANDISK_20x45 ? Just example.:)

And Your first patch is applied for every Sandisk card, isn't?

Best Regards,
Jaehoon Chung

> MMC_FIXUP("SEM02G", 0x45, CID_OEMID_ANY, add_quirk, MMC_QUIRK_INAND_CMD13) ?
> 
> If so, can I use :
> if (card->quirks & MMC_QUIRK_INAND_CMD38)
> msleep(1);
> 
> In drivers/mmc/core/mmc_ops.c ?
> Is this the good way ?
> 
> Thanks,
> JM
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jean-Michel Hautbois
Hi Jaehoon,

> On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
>> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
>> Without this patch, I/O errors occur.
>> This eMMC seems to have a different Manufacturer ID as it reads 0x45
>> and not 0x2 as specified in datasheet.
>
> I think this patch don't merge into mainline.
> This is not solution for problem.
> you mentioned the below comment, this is workaround.

Yes

>>
>> Signed-off-by: Jean-Michel Hautbois 
>> ---
>>  drivers/mmc/core/mmc_ops.c | 9 +
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
>> index f51b5ba..91babaa 100644
>> --- a/drivers/mmc/core/mmc_ops.c
>> +++ b/drivers/mmc/core/mmc_ops.c
>> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
>> index, u8 value,
>>   if (!use_busy_signal)
>>   return 0;
>>
>> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
>> +  * before sending CMD13 after CMD6
>> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
>> +  */
>> + if (card->cid.manfid == CID_MANFID_SANDISK ||
>> + card->cid.manfid == 0x45) {
>> + msleep(1);
>> + }
>
> If it's a general problem of Sandisk SDIN5D1-2G,
> I think you need to verify this problem. And can you use the MMC_FIXUP() and 
> QUIRK?

Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
have this MANFID different from what is defined by CID_MANFID_SANDISK.
How should I use MMC_FIXUP ? Like this ?
MMC_FIXUP("SEM02G", 0x45, CID_OEMID_ANY, add_quirk, MMC_QUIRK_INAND_CMD13) ?

If so, can I use :
if (card->quirks & MMC_QUIRK_INAND_CMD38)
msleep(1);

In drivers/mmc/core/mmc_ops.c ?
Is this the good way ?

Thanks,
JM
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jean-Michel Hautbois
Hi Jaehoon,

 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.

Yes


 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() and 
 QUIRK?

Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
have this MANFID different from what is defined by CID_MANFID_SANDISK.
How should I use MMC_FIXUP ? Like this ?
MMC_FIXUP(SEM02G, 0x45, CID_OEMID_ANY, add_quirk, MMC_QUIRK_INAND_CMD13) ?

If so, can I use :
if (card-quirks  MMC_QUIRK_INAND_CMD38)
msleep(1);

In drivers/mmc/core/mmc_ops.c ?
Is this the good way ?

Thanks,
JM
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jaehoon Chung
On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
 Hi Jaehoon,
 
 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.
 
 Yes
 

 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() and 
 QUIRK?
 
 Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
 have this MANFID different from what is defined by CID_MANFID_SANDISK.
 How should I use MMC_FIXUP ? Like this ?

I think you need to explain why delay is need.
i didn't have same card, but it might be your host controller or other problem. 

You can define the 0x45 with other naming.
ex) CID_MANFID_SANDISK_20x45 ? Just example.:)

And Your first patch is applied for every Sandisk card, isn't?

Best Regards,
Jaehoon Chung

 MMC_FIXUP(SEM02G, 0x45, CID_OEMID_ANY, add_quirk, MMC_QUIRK_INAND_CMD13) ?
 
 If so, can I use :
 if (card-quirks  MMC_QUIRK_INAND_CMD38)
 msleep(1);
 
 In drivers/mmc/core/mmc_ops.c ?
 Is this the good way ?
 
 Thanks,
 JM
 --
 To unsubscribe from this list: send the line unsubscribe linux-kernel in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 Please read the FAQ at  http://www.tux.org/lkml/
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jean-Michel Hautbois
2014-09-15 12:44 GMT+02:00 Jaehoon Chung jh80.ch...@samsung.com:
 On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
 Hi Jaehoon,

 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.

 Yes


 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() 
 and QUIRK?

 Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
 have this MANFID different from what is defined by CID_MANFID_SANDISK.
 How should I use MMC_FIXUP ? Like this ?

 I think you need to explain why delay is need.
 i didn't have same card, but it might be your host controller or other 
 problem.

Well, I don't know why it is needed, this is undocumented, nothing in
datasheet explains anything about this.

JM
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread Jean-Michel Hautbois
2014-09-15 12:53 GMT+02:00 Jean-Michel Hautbois
jean-michel.hautb...@vodalys.com:
 2014-09-15 12:44 GMT+02:00 Jaehoon Chung jh80.ch...@samsung.com:
 On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
 Hi Jaehoon,

 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.

 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.

 Yes


 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
 datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }

 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() 
 and QUIRK?

 Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
 have this MANFID different from what is defined by CID_MANFID_SANDISK.
 How should I use MMC_FIXUP ? Like this ?

 I think you need to explain why delay is need.
 i didn't have same card, but it might be your host controller or other 
 problem.

 Well, I don't know why it is needed, this is undocumented, nothing in
 datasheet explains anything about this.

It seems to be uSDHC / DDR mode related. I don't even know if this is
limited to Sandisk !
And I don't have another board with another manufacturer eMMC to test.
Maybe some guys from Freescale could help with this ?

Thanks,
JM
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-15 Thread hisanao.kinkawa
Hi

Do not hit the following bug?
Often, This bug fails setting of CMD6.

 Original Message 
Subject:Re: [PATCH v2] mmc:sdhci: handle busy-end interrupt during 
command
Date:   Tue, 2 Sep 2014 11:27:51 +0200
From:   Ulf Hansson ulf.hans...@linaro.org
To: Chanho Min chanho@lge.com



On 30 August 2014 05:40, Chanho Min chanho@lge.com wrote:
 It is fully legal for a controller to start handling busy-end interrupt
 before it has signaled that the command has completed. So make sure
 we do things in the proper order, Or it results that command interrupt
 is ignored so it can cause unexpected operations. This is founded at some
 toshiba emmc with the bellow warning.

 mmc0: Got command interrupt 0x0001 even though
 no command operation was in progress.

 This issue has been also reported by Youssef TRIKI:
 It is not specific to Toshiba devices, and happens with eMMC devices
 as well as SD card which support Auto-CMD12 rather than CMD23.

 Also, similar patch is submitted by:
 Gwendal Grignou gwen...@chromium.org

 Changes since v1:
  Fixed conflict with the next of git.linaro.org/people/ulf.hansson/mmc.git
  and Tested if issue is fixed again.

 Signed-off-by: Hankyung Yu hankyung...@lge.com
 Signed-off-by: Chanho Min chanho@lge.com
 Tested-by: Youssef TRIKI youssef.tr...@st.com

Best Regards,
===
Hisanao Kinkawa  [hisanao.kink...@toshiba.co.jp 
mailto:hisanao.kink...@toshiba.co.jp]
===


(2014/09/15 20:29), Jean-Michel Hautbois wrote:
 2014-09-15 12:53 GMT+02:00 Jean-Michel Hautbois
 jean-michel.hautb...@vodalys.com:
 2014-09-15 12:44 GMT+02:00 Jaehoon Chung jh80.ch...@samsung.com:
 On 09/15/2014 07:08 PM, Jean-Michel Hautbois wrote:
 Hi Jaehoon,

 On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.
 I think this patch don't merge into mainline.
 This is not solution for problem.
 you mentioned the below comment, this is workaround.
 Yes

 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
   drivers/mmc/core/mmc_ops.c | 9 +
   1 file changed, 9 insertions(+)

 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
if (!use_busy_signal)
return 0;

 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in 
 datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }
 If it's a general problem of Sandisk SDIN5D1-2G,
 I think you need to verify this problem. And can you use the MMC_FIXUP() 
 and QUIRK?
 Well, this is difficult to verify, I know that on all my SDIN5D1-2G I
 have this MANFID different from what is defined by CID_MANFID_SANDISK.
 How should I use MMC_FIXUP ? Like this ?
 I think you need to explain why delay is need.
 i didn't have same card, but it might be your host controller or other 
 problem.
 Well, I don't know why it is needed, this is undocumented, nothing in
 datasheet explains anything about this.
 It seems to be uSDHC / DDR mode related. I don't even know if this is
 limited to Sandisk !
 And I don't have another board with another manufacturer eMMC to test.
 Maybe some guys from Freescale could help with this ?

 Thanks,
 JM
 --
 To unsubscribe from this list: send the line unsubscribe linux-mmc in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
 .




Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-10 Thread Jaehoon Chung
Hi,

On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
> Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
> Without this patch, I/O errors occur.
> This eMMC seems to have a different Manufacturer ID as it reads 0x45
> and not 0x2 as specified in datasheet.

I think this patch don't merge into mainline.
This is not solution for problem.
you mentioned the below comment, this is workaround.

> 
> Signed-off-by: Jean-Michel Hautbois 
> ---
>  drivers/mmc/core/mmc_ops.c | 9 +
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index f51b5ba..91babaa 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
> index, u8 value,
>   if (!use_busy_signal)
>   return 0;
>  
> + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
> +  * before sending CMD13 after CMD6
> +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
> +  */
> + if (card->cid.manfid == CID_MANFID_SANDISK ||
> + card->cid.manfid == 0x45) {
> + msleep(1);
> + }

If it's a general problem of Sandisk SDIN5D1-2G,
I think you need to verify this problem. And can you use the MMC_FIXUP() and 
QUIRK?

Best Regards,
Jaehoon Chung

> +
>   /*
>* CRC errors shall only be ignored in cases were CMD13 is used to poll
>* to detect busy completion.
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-10 Thread Jaehoon Chung
Hi,

On 09/09/2014 09:26 PM, Jean-Michel Hautbois wrote:
 Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
 Without this patch, I/O errors occur.
 This eMMC seems to have a different Manufacturer ID as it reads 0x45
 and not 0x2 as specified in datasheet.

I think this patch don't merge into mainline.
This is not solution for problem.
you mentioned the below comment, this is workaround.

 
 Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
 ---
  drivers/mmc/core/mmc_ops.c | 9 +
  1 file changed, 9 insertions(+)
 
 diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
 index f51b5ba..91babaa 100644
 --- a/drivers/mmc/core/mmc_ops.c
 +++ b/drivers/mmc/core/mmc_ops.c
 @@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 
 index, u8 value,
   if (!use_busy_signal)
   return 0;
  
 + /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
 +  * before sending CMD13 after CMD6
 +  * On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
 +  */
 + if (card-cid.manfid == CID_MANFID_SANDISK ||
 + card-cid.manfid == 0x45) {
 + msleep(1);
 + }

If it's a general problem of Sandisk SDIN5D1-2G,
I think you need to verify this problem. And can you use the MMC_FIXUP() and 
QUIRK?

Best Regards,
Jaehoon Chung

 +
   /*
* CRC errors shall only be ignored in cases were CMD13 is used to poll
* to detect busy completion.
 

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-09 Thread Jean-Michel Hautbois
Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
Without this patch, I/O errors occur.
This eMMC seems to have a different Manufacturer ID as it reads 0x45
and not 0x2 as specified in datasheet.

Signed-off-by: Jean-Michel Hautbois 
---
 drivers/mmc/core/mmc_ops.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index f51b5ba..91babaa 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, 
u8 value,
if (!use_busy_signal)
return 0;
 
+   /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
+* before sending CMD13 after CMD6
+* On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
+*/
+   if (card->cid.manfid == CID_MANFID_SANDISK ||
+   card->cid.manfid == 0x45) {
+   msleep(1);
+   }
+
/*
 * CRC errors shall only be ignored in cases were CMD13 is used to poll
 * to detect busy completion.
-- 
2.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mmc: Add delay between CMD6 and CMD13 for Sandisk eMMC cards

2014-09-09 Thread Jean-Michel Hautbois
Tested on a i.MX6 board, with Sandisk SDIN5D1-2G.
Without this patch, I/O errors occur.
This eMMC seems to have a different Manufacturer ID as it reads 0x45
and not 0x2 as specified in datasheet.

Signed-off-by: Jean-Michel Hautbois jean-michel.hautb...@vodalys.com
---
 drivers/mmc/core/mmc_ops.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index f51b5ba..91babaa 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -458,6 +458,15 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, 
u8 value,
if (!use_busy_signal)
return 0;
 
+   /* WORKAROUND: for Sandisk eMMC cards, it might need certain delay
+* before sending CMD13 after CMD6
+* On SDIN5D1-2G MANFID is 0x45 and not 0x2 as specified in datasheet
+*/
+   if (card-cid.manfid == CID_MANFID_SANDISK ||
+   card-cid.manfid == 0x45) {
+   msleep(1);
+   }
+
/*
 * CRC errors shall only be ignored in cases were CMD13 is used to poll
 * to detect busy completion.
-- 
2.0.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/