linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
@ 2018-02-27 13:55 Phil Edworthy
  2018-02-27 14:08 ` Adrian Hunter
  2018-02-27 14:27 ` Shawn Lin
  0 siblings, 2 replies; 10+ messages in thread
From: Phil Edworthy @ 2018-02-27 13:55 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Michal Simek, Ulf Hansson, linux-mmc, linux-arm-kernel,
	linux-kernel, linux-renesas-soc, Phil Edworthy

Since the controller does not support the end-of-busy IRQ, don't use it.
Otherwise, on older SD cards you will get lots of these messages:
"mmc0: Got data interrupt 0x00000002 even though no data operation was in progress"

This has been reported on Xilinx devices that also use the Arasan IP.
See https://patchwork.kernel.org/patch/8062871/

This has been tested on the Renesas RZ/ND-DB board with the RZ/N1 SoC.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
 drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index c33a5f7..ab66e32 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data sdhci_arasan_pdata = {
 	.ops = &sdhci_arasan_ops,
 	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
-			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
+			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
+			SDHCI_QUIRK2_STOP_WITH_TC,
 };
 
 static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32 intmask)
-- 
2.7.4

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

* Re: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 13:55 [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg Phil Edworthy
@ 2018-02-27 14:08 ` Adrian Hunter
  2018-02-27 14:14   ` Phil Edworthy
  2018-02-27 14:27 ` Shawn Lin
  1 sibling, 1 reply; 10+ messages in thread
From: Adrian Hunter @ 2018-02-27 14:08 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Michal Simek, Ulf Hansson, linux-mmc, linux-arm-kernel,
	linux-kernel, linux-renesas-soc

On 27/02/18 15:55, Phil Edworthy wrote:
> Since the controller does not support the end-of-busy IRQ, don't use it.
> Otherwise, on older SD cards you will get lots of these messages:
> "mmc0: Got data interrupt 0x00000002 even though no data operation was in progress"

SDHCI_QUIRK2_STOP_WITH_TC may be the quirk you want but it doesn't match
your description.  SDHCI_QUIRK2_STOP_WITH_TC is when we always get a TC
(end-of-busy) IRQ with the STOP command even when we didn't ask for one.
Hence the TC interrupt (0x00000002) comes when we think we are already finished.

> 
> This has been reported on Xilinx devices that also use the Arasan IP.
> See https://patchwork.kernel.org/patch/8062871/
> 
> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1 SoC.
> 
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> ---
>  drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index c33a5f7..ab66e32 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data sdhci_arasan_pdata = {
>  	.ops = &sdhci_arasan_ops,
>  	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>  	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
> +			SDHCI_QUIRK2_STOP_WITH_TC,
>  };
>  
>  static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32 intmask)
> 

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

* RE: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 14:08 ` Adrian Hunter
@ 2018-02-27 14:14   ` Phil Edworthy
  0 siblings, 0 replies; 10+ messages in thread
From: Phil Edworthy @ 2018-02-27 14:14 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Michal Simek, Ulf Hansson, linux-mmc, linux-arm-kernel,
	linux-kernel, linux-renesas-soc

Hi Adrian,

On 27 February 2018 14:08, Adrian Hunter wrote:
> On 27/02/18 15:55, Phil Edworthy wrote:
> > Since the controller does not support the end-of-busy IRQ, don't use it.
> > Otherwise, on older SD cards you will get lots of these messages:
> > "mmc0: Got data interrupt 0x00000002 even though no data operation was
> in progress"
> 
> SDHCI_QUIRK2_STOP_WITH_TC may be the quirk you want but it doesn't
> match your description.  SDHCI_QUIRK2_STOP_WITH_TC is when we always
> get a TC
> (end-of-busy) IRQ with the STOP command even when we didn't ask for
> one.
> Hence the TC interrupt (0x00000002) comes when we think we are already
> finished.
Right, thanks for clarifying, I'll fixup the message.

> >
> > This has been reported on Xilinx devices that also use the Arasan IP.
> > See https://patchwork.kernel.org/patch/8062871/
> >
> > This has been tested on the Renesas RZ/ND-DB board with the RZ/N1 SoC.
> >
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > ---
> >  drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-of-arasan.c
> > b/drivers/mmc/host/sdhci-of-arasan.c
> > index c33a5f7..ab66e32 100644
> > --- a/drivers/mmc/host/sdhci-of-arasan.c
> > +++ b/drivers/mmc/host/sdhci-of-arasan.c
> > @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
> sdhci_arasan_pdata = {
> >  	.ops = &sdhci_arasan_ops,
> >  	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> >  	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> > -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> > +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
> > +			SDHCI_QUIRK2_STOP_WITH_TC,
> >  };
> >
> >  static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
> > intmask)
> >

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

* Re: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 13:55 [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg Phil Edworthy
  2018-02-27 14:08 ` Adrian Hunter
@ 2018-02-27 14:27 ` Shawn Lin
  2018-02-27 14:31   ` Phil Edworthy
  1 sibling, 1 reply; 10+ messages in thread
From: Shawn Lin @ 2018-02-27 14:27 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: Adrian Hunter, shawn.lin, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc

在 2018/2/27 21:55, Phil Edworthy 写道:
> Since the controller does not support the end-of-busy IRQ, don't use it.
> Otherwise, on older SD cards you will get lots of these messages:
> "mmc0: Got data interrupt 0x00000002 even though no data operation was in progress"
> 

I'm afraid you have to explain which version of arasan's IP suffer from
this and what does the "older SD cards" mean?

> This has been reported on Xilinx devices that also use the Arasan IP.
> See https://patchwork.kernel.org/patch/8062871/
> 
> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1 SoC.
> 
> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> ---
>   drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index c33a5f7..ab66e32 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data sdhci_arasan_pdata = {
>   	.ops = &sdhci_arasan_ops,
>   	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>   	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
> +			SDHCI_QUIRK2_STOP_WITH_TC,
>   };
>   
>   static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32 intmask)
> 


-- 
Best Regards
Shawn Lin

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

* RE: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 14:27 ` Shawn Lin
@ 2018-02-27 14:31   ` Phil Edworthy
  2018-02-27 14:42     ` Shawn Lin
  0 siblings, 1 reply; 10+ messages in thread
From: Phil Edworthy @ 2018-02-27 14:31 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Adrian Hunter, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc

Hi Shawn,

On 27 February 2018 14:28, Shawn Lin wrote:
> 在 2018/2/27 21:55, Phil Edworthy 写道:
> > Since the controller does not support the end-of-busy IRQ, don't use it.
> > Otherwise, on older SD cards you will get lots of these messages:
> > "mmc0: Got data interrupt 0x00000002 even though no data operation was
> in progress"
> >
> 
> I'm afraid you have to explain which version of arasan's IP suffer from this
> and what does the "older SD cards" mean?
Ok, I'll try to find out the IP version...
For "older SD cards", I can provide a list of a few cards that exhibit this problem
and others that don't, is that enough info?

Thanks
Phil

> > This has been reported on Xilinx devices that also use the Arasan IP.
> > See https://patchwork.kernel.org/patch/8062871/
> >
> > This has been tested on the Renesas RZ/ND-DB board with the RZ/N1 SoC.
> >
> > Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> > ---
> >   drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-of-arasan.c
> > b/drivers/mmc/host/sdhci-of-arasan.c
> > index c33a5f7..ab66e32 100644
> > --- a/drivers/mmc/host/sdhci-of-arasan.c
> > +++ b/drivers/mmc/host/sdhci-of-arasan.c
> > @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
> sdhci_arasan_pdata = {
> >   	.ops = &sdhci_arasan_ops,
> >   	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> >   	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> > -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> > +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
> > +			SDHCI_QUIRK2_STOP_WITH_TC,
> >   };
> >
> >   static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
> > intmask)
> >
> 
> 
> --
> Best Regards
> Shawn Lin

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

* Re: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 14:31   ` Phil Edworthy
@ 2018-02-27 14:42     ` Shawn Lin
  2018-02-27 15:05       ` Phil Edworthy
  0 siblings, 1 reply; 10+ messages in thread
From: Shawn Lin @ 2018-02-27 14:42 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: shawn.lin, Adrian Hunter, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc

On 2018/2/27 22:31, Phil Edworthy wrote:
> Hi Shawn,
> 
> On 27 February 2018 14:28, Shawn Lin wrote:
>> 在 2018/2/27 21:55, Phil Edworthy 写道:
>>> Since the controller does not support the end-of-busy IRQ, don't use it.
>>> Otherwise, on older SD cards you will get lots of these messages:
>>> "mmc0: Got data interrupt 0x00000002 even though no data operation was
>> in progress"
>>>
>>
>> I'm afraid you have to explain which version of arasan's IP suffer from this
>> and what does the "older SD cards" mean?
> Ok, I'll try to find out the IP version...
> For "older SD cards", I can provide a list of a few cards that exhibit this problem
> and others that don't, is that enough info?

What I meant is could you elaborate more about what kind of cards, e.g,
are them the  legacy SDSC cards or SDHC cards, or maybe they are only
running with defaut speed? or whatever, but not just with a vague
"older" cards. :)

> 
> Thanks
> Phil
> 
>>> This has been reported on Xilinx devices that also use the Arasan IP.
>>> See https://patchwork.kernel.org/patch/8062871/
>>>
>>> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1 SoC.
>>>
>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>>> ---
>>>    drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
>>> b/drivers/mmc/host/sdhci-of-arasan.c
>>> index c33a5f7..ab66e32 100644
>>> --- a/drivers/mmc/host/sdhci-of-arasan.c
>>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
>>> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
>> sdhci_arasan_pdata = {
>>>    	.ops = &sdhci_arasan_ops,
>>>    	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>>>    	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
>>> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
>>> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
>>> +			SDHCI_QUIRK2_STOP_WITH_TC,
>>>    };
>>>
>>>    static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
>>> intmask)
>>>
>>
>>
>> --
>> Best Regards
>> Shawn Lin
> 
> 
> 
> 


-- 
Best Regards
Shawn Lin

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

* RE: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 14:42     ` Shawn Lin
@ 2018-02-27 15:05       ` Phil Edworthy
  2018-02-28  1:53         ` Shawn Lin
  0 siblings, 1 reply; 10+ messages in thread
From: Phil Edworthy @ 2018-02-27 15:05 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Adrian Hunter, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc

Hi Shawn,

On 27 February 2018 14:42, Shawn Lin wrote:
> On 2018/2/27 22:31, Phil Edworthy wrote:
> > Hi Shawn,
> >
> > On 27 February 2018 14:28, Shawn Lin wrote:
> >> 在 2018/2/27 21:55, Phil Edworthy 写道:
> >>> Since the controller does not support the end-of-busy IRQ, don't use it.
> >>> Otherwise, on older SD cards you will get lots of these messages:
> >>> "mmc0: Got data interrupt 0x00000002 even though no data operation
> >>> was
> >> in progress"
> >>>
> >>
> >> I'm afraid you have to explain which version of arasan's IP suffer
> >> from this and what does the "older SD cards" mean?
> > Ok, I'll try to find out the IP version...
> > For "older SD cards", I can provide a list of a few cards that exhibit
> > this problem and others that don't, is that enough info?
> 
> What I meant is could you elaborate more about what kind of cards, e.g, are
> them the  legacy SDSC cards or SDHC cards, or maybe they are only running
> with defaut speed? or whatever, but not just with a vague "older" cards. :)
Unfortunately, I have one SDHC card that works, one that doesn't. Both cards
are running with a 50MHz SD clock. All I know is this:

SD cards that report unexpected interrupts:
2GB Sandisk Extreme III                     (e624 SD02G 1.89 GiB)
8GB Sandisk (SDHC class 4)              (aaaa SU08G 7.40 GiB)
8GB Sandisk Extreme III (SDHC class 6)    (bb4e SD08G 7.61 GiB)

SD cards that work ok:
16GB Samsung (microSDHC U1 class 10)          (0001 00000 14.6 GiB)
16GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL16G 14.8 GiB)
32GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL32G 29.7 GiB)

Thanks
Phil

> >>> This has been reported on Xilinx devices that also use the Arasan IP.
> >>> See https://patchwork.kernel.org/patch/8062871/
> >>>
> >>> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1
> SoC.
> >>>
> >>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> >>> ---
> >>>    drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
> >>>    1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
> >>> b/drivers/mmc/host/sdhci-of-arasan.c
> >>> index c33a5f7..ab66e32 100644
> >>> --- a/drivers/mmc/host/sdhci-of-arasan.c
> >>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> >>> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
> >> sdhci_arasan_pdata = {
> >>>    	.ops = &sdhci_arasan_ops,
> >>>    	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> >>>    	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> >>> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> >>> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
> >>> +			SDHCI_QUIRK2_STOP_WITH_TC,
> >>>    };
> >>>
> >>>    static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
> >>> intmask)
> >>>
> >>
> >>
> >> --
> >> Best Regards
> >> Shawn Lin
> >
> >
> >
> >
> 
> 
> --
> Best Regards
> Shawn Lin

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

* Re: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-27 15:05       ` Phil Edworthy
@ 2018-02-28  1:53         ` Shawn Lin
  2018-03-05 16:47           ` Phil Edworthy
  0 siblings, 1 reply; 10+ messages in thread
From: Shawn Lin @ 2018-02-28  1:53 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: shawn.lin, Adrian Hunter, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc

On 2018/2/27 23:05, Phil Edworthy wrote:
> Hi Shawn,
> 
> On 27 February 2018 14:42, Shawn Lin wrote:
>> On 2018/2/27 22:31, Phil Edworthy wrote:
>>> Hi Shawn,
>>>
>>> On 27 February 2018 14:28, Shawn Lin wrote:
>>>> 在 2018/2/27 21:55, Phil Edworthy 写道:
>>>>> Since the controller does not support the end-of-busy IRQ, don't use it.
>>>>> Otherwise, on older SD cards you will get lots of these messages:
>>>>> "mmc0: Got data interrupt 0x00000002 even though no data operation
>>>>> was
>>>> in progress"
>>>>>
>>>>
>>>> I'm afraid you have to explain which version of arasan's IP suffer
>>>> from this and what does the "older SD cards" mean?
>>> Ok, I'll try to find out the IP version...
>>> For "older SD cards", I can provide a list of a few cards that exhibit
>>> this problem and others that don't, is that enough info?
>>
>> What I meant is could you elaborate more about what kind of cards, e.g, are
>> them the  legacy SDSC cards or SDHC cards, or maybe they are only running
>> with defaut speed? or whatever, but not just with a vague "older" cards. :)
> Unfortunately, I have one SDHC card that works, one that doesn't. Both cards
> are running with a 50MHz SD clock. All I know is this:

Thanks for sharing these, though it looks wired as I never remember I
saw this problem when extensively tested SD cards on one of arasan
controllers in 2014.

> 
> SD cards that report unexpected interrupts:
> 2GB Sandisk Extreme III                     (e624 SD02G 1.89 GiB)
> 8GB Sandisk (SDHC class 4)              (aaaa SU08G 7.40 GiB)
> 8GB Sandisk Extreme III (SDHC class 6)    (bb4e SD08G 7.61 GiB)
> 
> SD cards that work ok:
> 16GB Samsung (microSDHC U1 class 10)          (0001 00000 14.6 GiB)
> 16GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL16G 14.8 GiB)
> 32GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL32G 29.7 GiB)
> 
> Thanks
> Phil
> 
>>>>> This has been reported on Xilinx devices that also use the Arasan IP.
>>>>> See https://patchwork.kernel.org/patch/8062871/
>>>>>
>>>>> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1
>> SoC.
>>>>>
>>>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>>>>> ---
>>>>>     drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
>>>>>     1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
>>>>> b/drivers/mmc/host/sdhci-of-arasan.c
>>>>> index c33a5f7..ab66e32 100644
>>>>> --- a/drivers/mmc/host/sdhci-of-arasan.c
>>>>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
>>>>> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
>>>> sdhci_arasan_pdata = {
>>>>>     	.ops = &sdhci_arasan_ops,
>>>>>     	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>>>>>     	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
>>>>> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
>>>>> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN |
>>>>> +			SDHCI_QUIRK2_STOP_WITH_TC,
>>>>>     };
>>>>>
>>>>>     static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
>>>>> intmask)
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards
>>>> Shawn Lin
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Best Regards
>> Shawn Lin
> 
> 
> 
> 

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

* RE: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-02-28  1:53         ` Shawn Lin
@ 2018-03-05 16:47           ` Phil Edworthy
  2018-03-06  0:55             ` Shawn Lin
  0 siblings, 1 reply; 10+ messages in thread
From: Phil Edworthy @ 2018-03-05 16:47 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Adrian Hunter, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc

Hi Shawn,

On 28 February 2018 01:53, Shawn Lin wrote:
> On 2018/2/27 23:05, Phil Edworthy wrote:
> > On 27 February 2018 14:42, Shawn Lin wrote:
> >> On 2018/2/27 22:31, Phil Edworthy wrote:
> >>> On 27 February 2018 14:28, Shawn Lin wrote:
> >>>> 在 2018/2/27 21:55, Phil Edworthy 写道:
> >>>>> Since the controller does not support the end-of-busy IRQ, don't use
> it.
> >>>>> Otherwise, on older SD cards you will get lots of these messages:
> >>>>> "mmc0: Got data interrupt 0x00000002 even though no data operation
> >>>>> was
> >>>> in progress"
> >>>>>
> >>>>
> >>>> I'm afraid you have to explain which version of arasan's IP suffer
> >>>> from this and what does the "older SD cards" mean?
> >>> Ok, I'll try to find out the IP version...
> >>> For "older SD cards", I can provide a list of a few cards that
> >>> exhibit this problem and others that don't, is that enough info?
> >>
> >> What I meant is could you elaborate more about what kind of cards,
> >> e.g, are them the  legacy SDSC cards or SDHC cards, or maybe they are
> >> only running with defaut speed? or whatever, but not just with a
> >> vague "older" cards. :)
> > Unfortunately, I have one SDHC card that works, one that doesn't. Both
> > cards are running with a 50MHz SD clock. All I know is this:
> 
> Thanks for sharing these, though it looks wired as I never remember I saw
> this problem when extensively tested SD cards on one of arasan controllers
> in 2014.
Not sure what you mean by 'wired'?

Note that this is on a relatively slow device, a dual core Cortex A7 @500MHz.
Maybe that has some effect.

It's also interesting that someone posted the same fix for Xilinx a while
back, I linked to it in the commit msg.

Thanks
Phil


> > SD cards that report unexpected interrupts:
> > 2GB Sandisk Extreme III                     (e624 SD02G 1.89 GiB)
> > 8GB Sandisk (SDHC class 4)              (aaaa SU08G 7.40 GiB)
> > 8GB Sandisk Extreme III (SDHC class 6)    (bb4e SD08G 7.61 GiB)
> >
> > SD cards that work ok:
> > 16GB Samsung (microSDHC U1 class 10)          (0001 00000 14.6 GiB)
> > 16GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL16G 14.8 GiB)
> > 32GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL32G 29.7 GiB)
> >
> > Thanks
> > Phil
> >
> >>>>> This has been reported on Xilinx devices that also use the Arasan IP.
> >>>>> See https://patchwork.kernel.org/patch/8062871/
> >>>>>
> >>>>> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1
> >> SoC.
> >>>>>
> >>>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> >>>>> ---
> >>>>>     drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
> >>>>>     1 file changed, 2 insertions(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
> >>>>> b/drivers/mmc/host/sdhci-of-arasan.c
> >>>>> index c33a5f7..ab66e32 100644
> >>>>> --- a/drivers/mmc/host/sdhci-of-arasan.c
> >>>>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> >>>>> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
> >>>> sdhci_arasan_pdata = {
> >>>>>     	.ops = &sdhci_arasan_ops,
> >>>>>     	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> >>>>>     	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
> >>>>> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
> >>>>> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN
> |
> >>>>> +			SDHCI_QUIRK2_STOP_WITH_TC,
> >>>>>     };
> >>>>>
> >>>>>     static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
> >>>>> intmask)
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Best Regards
> >>>> Shawn Lin
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >> --
> >> Best Regards
> >> Shawn Lin
> >
> >
> >
> >

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

* Re: [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg
  2018-03-05 16:47           ` Phil Edworthy
@ 2018-03-06  0:55             ` Shawn Lin
  0 siblings, 0 replies; 10+ messages in thread
From: Shawn Lin @ 2018-03-06  0:55 UTC (permalink / raw)
  To: Phil Edworthy
  Cc: shawn.lin, Adrian Hunter, Michal Simek, Ulf Hansson, linux-mmc,
	linux-arm-kernel, linux-kernel, linux-renesas-soc


On 2018/3/6 0:47, Phil Edworthy wrote:
> Hi Shawn,
> 
> On 28 February 2018 01:53, Shawn Lin wrote:
>> On 2018/2/27 23:05, Phil Edworthy wrote:
>>> On 27 February 2018 14:42, Shawn Lin wrote:
>>>> On 2018/2/27 22:31, Phil Edworthy wrote:
>>>>> On 27 February 2018 14:28, Shawn Lin wrote:
>>>>>> 在 2018/2/27 21:55, Phil Edworthy 写道:
>>>>>>> Since the controller does not support the end-of-busy IRQ, don't use
>> it.
>>>>>>> Otherwise, on older SD cards you will get lots of these messages:
>>>>>>> "mmc0: Got data interrupt 0x00000002 even though no data operation
>>>>>>> was
>>>>>> in progress"
>>>>>>>
>>>>>>
>>>>>> I'm afraid you have to explain which version of arasan's IP suffer
>>>>>> from this and what does the "older SD cards" mean?
>>>>> Ok, I'll try to find out the IP version...
>>>>> For "older SD cards", I can provide a list of a few cards that
>>>>> exhibit this problem and others that don't, is that enough info?
>>>>
>>>> What I meant is could you elaborate more about what kind of cards,
>>>> e.g, are them the  legacy SDSC cards or SDHC cards, or maybe they are
>>>> only running with defaut speed? or whatever, but not just with a
>>>> vague "older" cards. :)
>>> Unfortunately, I have one SDHC card that works, one that doesn't. Both
>>> cards are running with a 50MHz SD clock. All I know is this:
>>
>> Thanks for sharing these, though it looks wired as I never remember I saw
>> this problem when extensively tested SD cards on one of arasan controllers
>> in 2014.
> Not sure what you mean by 'wired'?
> 
> Note that this is on a relatively slow device, a dual core Cortex A7 @500MHz.
> Maybe that has some effect.

That's why I hope you could add the IP version in your commit msg, and
that would be a hint for why it behaved different over platforms.

> 
> It's also interesting that someone posted the same fix for Xilinx a while
> back, I linked to it in the commit msg.
> 
> Thanks
> Phil
> 
> 
>>> SD cards that report unexpected interrupts:
>>> 2GB Sandisk Extreme III                     (e624 SD02G 1.89 GiB)
>>> 8GB Sandisk (SDHC class 4)              (aaaa SU08G 7.40 GiB)
>>> 8GB Sandisk Extreme III (SDHC class 6)    (bb4e SD08G 7.61 GiB)
>>>
>>> SD cards that work ok:
>>> 16GB Samsung (microSDHC U1 class 10)          (0001 00000 14.6 GiB)
>>> 16GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL16G 14.8 GiB)
>>> 32GB Sandisk Ultra (microSDHC U1 class 10)    (aaaa SL32G 29.7 GiB)
>>>
>>> Thanks
>>> Phil
>>>
>>>>>>> This has been reported on Xilinx devices that also use the Arasan IP.
>>>>>>> See https://patchwork.kernel.org/patch/8062871/
>>>>>>>
>>>>>>> This has been tested on the Renesas RZ/ND-DB board with the RZ/N1
>>>> SoC.
>>>>>>>
>>>>>>> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
>>>>>>> ---
>>>>>>>      drivers/mmc/host/sdhci-of-arasan.c | 3 ++-
>>>>>>>      1 file changed, 2 insertions(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c
>>>>>>> b/drivers/mmc/host/sdhci-of-arasan.c
>>>>>>> index c33a5f7..ab66e32 100644
>>>>>>> --- a/drivers/mmc/host/sdhci-of-arasan.c
>>>>>>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
>>>>>>> @@ -290,7 +290,8 @@ static const struct sdhci_pltfm_data
>>>>>> sdhci_arasan_pdata = {
>>>>>>>      	.ops = &sdhci_arasan_ops,
>>>>>>>      	.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>>>>>>>      	.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
>>>>>>> -			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
>>>>>>> +			SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN
>> |
>>>>>>> +			SDHCI_QUIRK2_STOP_WITH_TC,
>>>>>>>      };
>>>>>>>
>>>>>>>      static u32 sdhci_arasan_cqhci_irq(struct sdhci_host *host, u32
>>>>>>> intmask)
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards
>>>>>> Shawn Lin
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards
>>>> Shawn Lin
>>>
>>>
>>>
>>>
> 
> 
> 
> 

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

end of thread, other threads:[~2018-03-06  0:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 13:55 [PATCH] mmc: sdhci-of-arasan: Add quirk to avoid erroneous msg Phil Edworthy
2018-02-27 14:08 ` Adrian Hunter
2018-02-27 14:14   ` Phil Edworthy
2018-02-27 14:27 ` Shawn Lin
2018-02-27 14:31   ` Phil Edworthy
2018-02-27 14:42     ` Shawn Lin
2018-02-27 15:05       ` Phil Edworthy
2018-02-28  1:53         ` Shawn Lin
2018-03-05 16:47           ` Phil Edworthy
2018-03-06  0:55             ` Shawn Lin

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).