linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+
@ 2021-06-04 12:59 Geert Uytterhoeven
  2021-06-04 13:16 ` Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-06-04 12:59 UTC (permalink / raw)
  To: Wolfram Sang, Ulf Hansson
  Cc: Takeshi Saito, Yoshihiro Shimoda, linux-mmc, linux-renesas-soc,
	linux-kernel, Geert Uytterhoeven

R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own
compatible value "renesas,r8a77961".

Hence using soc_device_match() with soc_id = "r8a7796" and revision =
"ES3.*" does not actually match running on an R-Car M3-W+ SoC.

Fix this by matching with soc_id = "r8a77961" instead.

Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Boot-tested on Salvator-XS with R-Car M3-W+ ES3.0.
No difference seen in eMMC/SHHC detection:

    mmc0: new HS400 MMC card at address 0001
    mmcblk0: mmc0:0001 BGSD4R 29.1 GiB
    mmcblk0boot0: mmc0:0001 BGSD4R 31.9 MiB
    mmcblk0boot1: mmc0:0001 BGSD4R 31.9 MiB
    mmcblk0rpmb: mmc0:0001 BGSD4R 4.00 MiB, chardev (247:0)
     mmcblk0: p1
    mmc1: new ultra high speed SDR104 SDHC card at address aaaa
    mmcblk1: mmc1:aaaa SL16G 14.8 GiB
     mmcblk1: p1
    mmc2: new ultra high speed SDR104 SDHC card at address aaaa
    mmcblk2: mmc2:aaaa SL32G 29.7 GiB
     mmcblk2: p1
---
 drivers/mmc/host/renesas_sdhi_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 635bf31a67359f10..b719eda6b8619453 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -939,7 +939,7 @@ static const struct soc_device_attribute sdhi_quirks_match[]  = {
 	{ .soc_id = "r8a7795", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps2367 },
 	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
 	{ .soc_id = "r8a7796", .revision = "ES1.*", .data = &sdhi_quirks_r8a7796_es13 },
-	{ .soc_id = "r8a7796", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps1357 },
+	{ .soc_id = "r8a77961", .data = &sdhi_quirks_bad_taps1357 },
 	{ .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
 	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
 	{ .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },
-- 
2.25.1


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

* Re: [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+
  2021-06-04 12:59 [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ Geert Uytterhoeven
@ 2021-06-04 13:16 ` Wolfram Sang
  2021-06-04 13:18   ` Geert Uytterhoeven
  2021-06-04 16:13 ` Niklas Söderlund
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2021-06-04 13:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Ulf Hansson, Takeshi Saito, Yoshihiro Shimoda, linux-mmc,
	linux-renesas-soc, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

On Fri, Jun 04, 2021 at 02:59:43PM +0200, Geert Uytterhoeven wrote:
> R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own
> compatible value "renesas,r8a77961".
> 
> Hence using soc_device_match() with soc_id = "r8a7796" and revision =
> "ES3.*" does not actually match running on an R-Car M3-W+ SoC.
> 
> Fix this by matching with soc_id = "r8a77961" instead.
> 
> Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Great, thanks for this fix!

> Boot-tested on Salvator-XS with R-Car M3-W+ ES3.0.
> No difference seen in eMMC/SHHC detection:

You'd need some stress testing plus debug output of the TAPs chosen to
actually see a difference. However, the patch is obviously correct.
Testing if soc_id actually matches now is good enough.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+
  2021-06-04 13:16 ` Wolfram Sang
@ 2021-06-04 13:18   ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-06-04 13:18 UTC (permalink / raw)
  To: Wolfram Sang, Ulf Hansson, Takeshi Saito, Yoshihiro Shimoda,
	Linux MMC List, Linux-Renesas, Linux Kernel Mailing List

Hi Wolfram,

On Fri, Jun 4, 2021 at 3:16 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> On Fri, Jun 04, 2021 at 02:59:43PM +0200, Geert Uytterhoeven wrote:
> > R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own
> > compatible value "renesas,r8a77961".
> >
> > Hence using soc_device_match() with soc_id = "r8a7796" and revision =
> > "ES3.*" does not actually match running on an R-Car M3-W+ SoC.
> >
> > Fix this by matching with soc_id = "r8a77961" instead.
> >
> > Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Great, thanks for this fix!
>
> > Boot-tested on Salvator-XS with R-Car M3-W+ ES3.0.
> > No difference seen in eMMC/SHHC detection:
>
> You'd need some stress testing plus debug output of the TAPs chosen to
> actually see a difference. However, the patch is obviously correct.
> Testing if soc_id actually matches now is good enough.

FTR, I did check that part.

> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+
  2021-06-04 12:59 [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ Geert Uytterhoeven
  2021-06-04 13:16 ` Wolfram Sang
@ 2021-06-04 16:13 ` Niklas Söderlund
  2021-06-07  1:08 ` Yoshihiro Shimoda
  2021-06-08 13:16 ` Ulf Hansson
  3 siblings, 0 replies; 6+ messages in thread
From: Niklas Söderlund @ 2021-06-04 16:13 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wolfram Sang, Ulf Hansson, Takeshi Saito, Yoshihiro Shimoda,
	linux-mmc, linux-renesas-soc, linux-kernel

Hi Geert,

Thanks for your work.

On 2021-06-04 14:59:43 +0200, Geert Uytterhoeven wrote:
> R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own
> compatible value "renesas,r8a77961".
> 
> Hence using soc_device_match() with soc_id = "r8a7796" and revision =
> "ES3.*" does not actually match running on an R-Car M3-W+ SoC.
> 
> Fix this by matching with soc_id = "r8a77961" instead.
> 
> Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> Boot-tested on Salvator-XS with R-Car M3-W+ ES3.0.
> No difference seen in eMMC/SHHC detection:
> 
>     mmc0: new HS400 MMC card at address 0001
>     mmcblk0: mmc0:0001 BGSD4R 29.1 GiB
>     mmcblk0boot0: mmc0:0001 BGSD4R 31.9 MiB
>     mmcblk0boot1: mmc0:0001 BGSD4R 31.9 MiB
>     mmcblk0rpmb: mmc0:0001 BGSD4R 4.00 MiB, chardev (247:0)
>      mmcblk0: p1
>     mmc1: new ultra high speed SDR104 SDHC card at address aaaa
>     mmcblk1: mmc1:aaaa SL16G 14.8 GiB
>      mmcblk1: p1
>     mmc2: new ultra high speed SDR104 SDHC card at address aaaa
>     mmcblk2: mmc2:aaaa SL32G 29.7 GiB
>      mmcblk2: p1
> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 635bf31a67359f10..b719eda6b8619453 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -939,7 +939,7 @@ static const struct soc_device_attribute sdhi_quirks_match[]  = {
>  	{ .soc_id = "r8a7795", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps2367 },
>  	{ .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
>  	{ .soc_id = "r8a7796", .revision = "ES1.*", .data = &sdhi_quirks_r8a7796_es13 },
> -	{ .soc_id = "r8a7796", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps1357 },
> +	{ .soc_id = "r8a77961", .data = &sdhi_quirks_bad_taps1357 },
>  	{ .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
>  	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
>  	{ .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },
> -- 
> 2.25.1
> 

-- 
Regards,
Niklas Söderlund

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

* RE: [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+
  2021-06-04 12:59 [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ Geert Uytterhoeven
  2021-06-04 13:16 ` Wolfram Sang
  2021-06-04 16:13 ` Niklas Söderlund
@ 2021-06-07  1:08 ` Yoshihiro Shimoda
  2021-06-08 13:16 ` Ulf Hansson
  3 siblings, 0 replies; 6+ messages in thread
From: Yoshihiro Shimoda @ 2021-06-07  1:08 UTC (permalink / raw)
  To: Geert Uytterhoeven, Wolfram Sang, Ulf Hansson
  Cc: Takeshi Saito, linux-mmc, linux-renesas-soc, linux-kernel

Hi Geert-san,

> From: Geert Uytterhoeven, Sent: Friday, June 4, 2021 10:00 PM
> 
> R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own
> compatible value "renesas,r8a77961".
> 
> Hence using soc_device_match() with soc_id = "r8a7796" and revision =
> "ES3.*" does not actually match running on an R-Car M3-W+ SoC.
> 
> Fix this by matching with soc_id = "r8a77961" instead.
> 
> Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda


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

* Re: [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+
  2021-06-04 12:59 [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2021-06-07  1:08 ` Yoshihiro Shimoda
@ 2021-06-08 13:16 ` Ulf Hansson
  3 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2021-06-08 13:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wolfram Sang, Takeshi Saito, Yoshihiro Shimoda, linux-mmc,
	Linux-Renesas, Linux Kernel Mailing List

On Fri, 4 Jun 2021 at 14:59, Geert Uytterhoeven <geert+renesas@glider.be> wrote:
>
> R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own
> compatible value "renesas,r8a77961".
>
> Hence using soc_device_match() with soc_id = "r8a7796" and revision =
> "ES3.*" does not actually match running on an R-Car M3-W+ SoC.
>
> Fix this by matching with soc_id = "r8a77961" instead.
>
> Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
> Boot-tested on Salvator-XS with R-Car M3-W+ ES3.0.
> No difference seen in eMMC/SHHC detection:
>
>     mmc0: new HS400 MMC card at address 0001
>     mmcblk0: mmc0:0001 BGSD4R 29.1 GiB
>     mmcblk0boot0: mmc0:0001 BGSD4R 31.9 MiB
>     mmcblk0boot1: mmc0:0001 BGSD4R 31.9 MiB
>     mmcblk0rpmb: mmc0:0001 BGSD4R 4.00 MiB, chardev (247:0)
>      mmcblk0: p1
>     mmc1: new ultra high speed SDR104 SDHC card at address aaaa
>     mmcblk1: mmc1:aaaa SL16G 14.8 GiB
>      mmcblk1: p1
>     mmc2: new ultra high speed SDR104 SDHC card at address aaaa
>     mmcblk2: mmc2:aaaa SL32G 29.7 GiB
>      mmcblk2: p1
> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index 635bf31a67359f10..b719eda6b8619453 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -939,7 +939,7 @@ static const struct soc_device_attribute sdhi_quirks_match[]  = {
>         { .soc_id = "r8a7795", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps2367 },
>         { .soc_id = "r8a7796", .revision = "ES1.[012]", .data = &sdhi_quirks_4tap_nohs400 },
>         { .soc_id = "r8a7796", .revision = "ES1.*", .data = &sdhi_quirks_r8a7796_es13 },
> -       { .soc_id = "r8a7796", .revision = "ES3.*", .data = &sdhi_quirks_bad_taps1357 },
> +       { .soc_id = "r8a77961", .data = &sdhi_quirks_bad_taps1357 },
>         { .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
>         { .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
>         { .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },
> --
> 2.25.1
>

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

end of thread, other threads:[~2021-06-08 13:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 12:59 [PATCH] mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ Geert Uytterhoeven
2021-06-04 13:16 ` Wolfram Sang
2021-06-04 13:18   ` Geert Uytterhoeven
2021-06-04 16:13 ` Niklas Söderlund
2021-06-07  1:08 ` Yoshihiro Shimoda
2021-06-08 13:16 ` Ulf Hansson

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