diff mbox series

[2/2] mmc: sdhci-iproc: Set NO_HISPD bit to fix HS50 data hold time problem

Message ID 20190506170115.10840-3-scott.branden@broadcom.com (mailing list archive)
State New, archived
Headers show
Series mmc: sdhci-iproc: fixes for HS50 data hold time | expand

Commit Message

Scott Branden May 6, 2019, 5:01 p.m. UTC
From: Trac Hoang <trac.hoang@broadcom.com>

The iproc host eMMC/SD controller hold time does not meet the
specification in the HS50 mode.  This problem can be mitigated
by disabling the HISPD bit; thus forcing the controller output
data to be driven on the falling clock edges rather than the
rising clock edges.

Fixes: f5f968f2371c ("mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read")
Signed-off-by: Trac Hoang <trac.hoang@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
---
 drivers/mmc/host/sdhci-iproc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Adrian Hunter May 7, 2019, 6:31 a.m. UTC | #1
On 6/05/19 8:01 PM, Scott Branden wrote:
> From: Trac Hoang <trac.hoang@broadcom.com>
> 
> The iproc host eMMC/SD controller hold time does not meet the
> specification in the HS50 mode.  This problem can be mitigated
> by disabling the HISPD bit; thus forcing the controller output
> data to be driven on the falling clock edges rather than the
> rising clock edges.
> 
> Fixes: f5f968f2371c ("mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read")

Is this fixes tag correct, because it doesn't seem related.  Maybe explain
that in the commit message.

> Signed-off-by: Trac Hoang <trac.hoang@broadcom.com>
> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
> ---
>  drivers/mmc/host/sdhci-iproc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 9d4071c41c94..2feb4ef32035 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -220,7 +220,8 @@ static const struct sdhci_iproc_data iproc_cygnus_data = {
>  
>  static const struct sdhci_pltfm_data sdhci_iproc_pltfm_data = {
>  	.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
> -		  SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> +		  SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
> +		  SDHCI_QUIRK_NO_HISPD_BIT,
>  	.quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN,
>  	.ops = &sdhci_iproc_ops,
>  };
>
Scott Branden May 7, 2019, 10:46 p.m. UTC | #2
Hi Adrian,

On 2019-05-06 11:31 p.m., Adrian Hunter wrote:
> On 6/05/19 8:01 PM, Scott Branden wrote:
>> From: Trac Hoang <trac.hoang@broadcom.com>
>>
>> The iproc host eMMC/SD controller hold time does not meet the
>> specification in the HS50 mode.  This problem can be mitigated
>> by disabling the HISPD bit; thus forcing the controller output
>> data to be driven on the falling clock edges rather than the
>> rising clock edges.
>>
>> Fixes: f5f968f2371c ("mmc: sdhci-iproc: suppress spurious interrupt with Multiblock read")
> Is this fixes tag correct, because it doesn't seem related.  Maybe explain
> that in the commit message.

I chose this tag to assist stable kernel maintainers so that the change 
does not produce merge conflicts backporting to older kernel versions.

In reality, the timing bug existed since the driver was first introduced 
but there is no need for this driver to be supported in kernel versions 
that old.

Do you want me to add such to the commit message?

>
>> Signed-off-by: Trac Hoang <trac.hoang@broadcom.com>
>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>> ---
>>   drivers/mmc/host/sdhci-iproc.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
>> index 9d4071c41c94..2feb4ef32035 100644
>> --- a/drivers/mmc/host/sdhci-iproc.c
>> +++ b/drivers/mmc/host/sdhci-iproc.c
>> @@ -220,7 +220,8 @@ static const struct sdhci_iproc_data iproc_cygnus_data = {
>>   
>>   static const struct sdhci_pltfm_data sdhci_iproc_pltfm_data = {
>>   	.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
>> -		  SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
>> +		  SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
>> +		  SDHCI_QUIRK_NO_HISPD_BIT,
>>   	.quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN,
>>   	.ops = &sdhci_iproc_ops,
>>   };
>>
Adrian Hunter May 8, 2019, 5:56 a.m. UTC | #3
On 8/05/19 1:46 AM, Scott Branden wrote:
> Hi Adrian,
> 
> On 2019-05-06 11:31 p.m., Adrian Hunter wrote:
>> On 6/05/19 8:01 PM, Scott Branden wrote:
>>> From: Trac Hoang <trac.hoang@broadcom.com>
>>>
>>> The iproc host eMMC/SD controller hold time does not meet the
>>> specification in the HS50 mode.  This problem can be mitigated
>>> by disabling the HISPD bit; thus forcing the controller output
>>> data to be driven on the falling clock edges rather than the
>>> rising clock edges.
>>>
>>> Fixes: f5f968f2371c ("mmc: sdhci-iproc: suppress spurious interrupt with
>>> Multiblock read")
>> Is this fixes tag correct, because it doesn't seem related.  Maybe explain
>> that in the commit message.
> 
> I chose this tag to assist stable kernel maintainers so that the change does
> not produce merge conflicts backporting to older kernel versions.
> 
> In reality, the timing bug existed since the driver was first introduced but
> there is no need for this driver to be supported in kernel versions that old.

You don't need to use the Fixes tag for that.  You can put it on the Cc line
e.g.

Cc: stable@vger.kernel.org # v4.12+

> Do you want me to add such to the commit message?

Yes please.

> 
>>
>>> Signed-off-by: Trac Hoang <trac.hoang@broadcom.com>
>>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>>> ---
>>>   drivers/mmc/host/sdhci-iproc.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
>>> index 9d4071c41c94..2feb4ef32035 100644
>>> --- a/drivers/mmc/host/sdhci-iproc.c
>>> +++ b/drivers/mmc/host/sdhci-iproc.c
>>> @@ -220,7 +220,8 @@ static const struct sdhci_iproc_data
>>> iproc_cygnus_data = {
>>>     static const struct sdhci_pltfm_data sdhci_iproc_pltfm_data = {
>>>       .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
>>> -          SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
>>> +          SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
>>> +          SDHCI_QUIRK_NO_HISPD_BIT,
>>>       .quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN,
>>>       .ops = &sdhci_iproc_ops,
>>>   };
>>>
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 9d4071c41c94..2feb4ef32035 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -220,7 +220,8 @@  static const struct sdhci_iproc_data iproc_cygnus_data = {
 
 static const struct sdhci_pltfm_data sdhci_iproc_pltfm_data = {
 	.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
-		  SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
+		  SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
+		  SDHCI_QUIRK_NO_HISPD_BIT,
 	.quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN,
 	.ops = &sdhci_iproc_ops,
 };