mmc: sdhi: improve HS400 quirk handling
Subsystems (2)
Wolfram Sang
maintainerv2 cover mmc: sdhi: improve HS400 quirk handling
There are some more SoCs which cannot handle HS400. Add them and clean up the quirk handling a bit. So, patch 1 is suitable for stable, the rest isn't.
Note that I don't have that HW, so I am relying on the provided information.
Changes since v1 (thanks Geert and Fabrizio!):
* use '[012]' to specify the range instead of single entries
* add RZ/G2M to the list
Wolfram Sang (3):
mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
mmc: sdhi: improve quirk descriptions
mmc: sdhi: remove unneeded initialization
drivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
Signature · 1 line
2.11.0
Wolfram Sang
maintainerPATCH v2 1/3 mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
Our HW engineers informed us that HS400 is not working on these SoC revisions.
--- drivers/mmc/host/renesas_sdhi_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/mmc/host/renesas_sdhi_core.c +7 -2
@@ -620,11 +620,16 @@ static const struct renesas_sdhi_quirks sdhi_quirks_h3_es2 = { .hs400_4taps = true, }; +static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = { + .hs400_disabled = true, +}; +static const struct soc_device_attribute sdhi_quirks_match[] = { { .soc_id ="r8a7795" , .revision ="ES1.*" , .data = &sdhi_quirks_h3_m3w_es1 }, { .soc_id ="r8a7795" , .revision ="ES2.0" , .data = &sdhi_quirks_h3_es2 }, - { .soc_id ="r8a7796" , .revision ="ES1.0" , .data = &sdhi_quirks_h3_m3w_es1 }, - { .soc_id ="r8a7796" , .revision ="ES1.1" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a7796" , .revision ="ES1.[012]" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a774a1" , .revision ="ES1.[012]" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a77980" , .data = &sdhi_quirks_nohs400 }, {/* Sentinel. */ }, };
Signature · 1 line
2.11.0
Re: [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
Quoted 5 lines · Wolfram Sang
Our HW engineers informed us that HS400 is not working on these SoC revisions.
Fixes 0f4e2054c971 ("mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.[012]")Signed-off-by Wolfram Sang <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
RE: [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
In reply to Wolfram SangHello Wolfram!
Thank you for adding the r8a774a1 to the list!
Quoted 9 lines
From: Wolfram Sang <[email protected]>
Sent: 06 June 2019 12:36
Subject: [PATCH v2 1/3] mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3HOur HW engineers informed us that HS400 is not working on these SoC revisions.
Fixes 0f4e2054c971 ("mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.[012]")Signed-off-by Wolfram Sang <[email protected]>
Quoted 29 lines
--- drivers/mmc/host/renesas_sdhi_core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/mmc/host/renesas_sdhi_core.c +7
-3@@ -620,11 +620,16 @@ static const struct renesas_sdhi_quirks sdhi_quirks_h3_es2 = { .hs400_4taps = true, }; +static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = { + .hs400_disabled = true, +}; +static const struct soc_device_attribute sdhi_quirks_match[] = { { .soc_id ="r8a7795" , .revision ="ES1.*" , .data = &sdhi_quirks_h3_m3w_es1 }, { .soc_id ="r8a7795" , .revision ="ES2.0" , .data = &sdhi_quirks_h3_es2 }, - { .soc_id ="r8a7796" , .revision ="ES1.0" , .data = &sdhi_quirks_h3_m3w_es1 }, - { .soc_id ="r8a7796" , .revision ="ES1.1" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a7796" , .revision ="ES1.[012]" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a774a1" , .revision ="ES1.[012]" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a77980" , .data = &sdhi_quirks_nohs400 }, {/* Sentinel. */ }, }; --2.11.0
Wolfram Sang
maintainerPATCH v2 2/3 mmc: sdhi: improve quirk descriptions
In reply to Wolfram SangQuirks show up in new SoCs as well, so the naming should be generic. Describe them by what they do.
--- drivers/mmc/host/renesas_sdhi_core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/mmc/host/renesas_sdhi_core.c +6 -6
@@ -610,12 +610,12 @@ static void renesas_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable)renesas_sdhi_sdbuf_width (host, enable ? width :16 ); } -static const struct renesas_sdhi_quirks sdhi_quirks_h3_m3w_es1 = { +static const struct renesas_sdhi_quirks sdhi_quirks_4tap_nohs400 = { .hs400_disabled = true, .hs400_4taps = true, }; -static const struct renesas_sdhi_quirks sdhi_quirks_h3_es2 = { +static const struct renesas_sdhi_quirks sdhi_quirks_4tap = { .hs400_disabled = false, .hs400_4taps = true, };
@@ -625,10 +625,10 @@ static const struct renesas_sdhi_quirks sdhi_quirks_nohs400 = { };static const struct soc_device_attribute sdhi_quirks_match[] = { - { .soc_id ="r8a7795" , .revision ="ES1.*" , .data = &sdhi_quirks_h3_m3w_es1 }, - { .soc_id ="r8a7795" , .revision ="ES2.0" , .data = &sdhi_quirks_h3_es2 }, - { .soc_id ="r8a7796" , .revision ="ES1.[012]" , .data = &sdhi_quirks_h3_m3w_es1 }, - { .soc_id ="r8a774a1" , .revision ="ES1.[012]" , .data = &sdhi_quirks_h3_m3w_es1 }, + { .soc_id ="r8a7795" , .revision ="ES1.*" , .data = &sdhi_quirks_4tap_nohs400 }, + { .soc_id ="r8a7795" , .revision ="ES2.0" , .data = &sdhi_quirks_4tap }, + { .soc_id ="r8a7796" , .revision ="ES1.[012]" , .data = &sdhi_quirks_4tap_nohs400 }, + { .soc_id ="r8a774a1" , .revision ="ES1.[012]" , .data = &sdhi_quirks_4tap_nohs400 }, { .soc_id ="r8a77980" , .data = &sdhi_quirks_nohs400 }, {/* Sentinel. */ }, };
Signature · 1 line
2.11.0
Re: [PATCH v2 2/3] mmc: sdhi: improve quirk descriptions
Quoted 4 lines · Wolfram Sang
Quirks show up in new SoCs as well, so the naming should be generic. Describe them by what they do.
Signed-off-by Wolfram Sang <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Wolfram Sang
maintainerPATCH v2 3/3 mmc: sdhi: remove unneeded initialization
In reply to Wolfram SangBools are initialized to 'false' by default.
--- drivers/mmc/host/renesas_sdhi_core.c | 1 - 1 file changed, 1 deletion(-)
drivers/mmc/host/renesas_sdhi_core.c +0 -1
@@ -616,7 +616,6 @@ static const struct renesas_sdhi_quirks sdhi_quirks_4tap_nohs400 = { };static const struct renesas_sdhi_quirks sdhi_quirks_4tap = { - .hs400_disabled = false, .hs400_4taps = true, };
Signature · 1 line
2.11.0
Re: [PATCH v2 3/3] mmc: sdhi: remove unneeded initialization
Quoted 3 lines · Wolfram Sang
Bools are initialized to 'false' by default.
Signed-off-by Wolfram Sang <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Hi (again) Wolfram,
I now see there was a v2 of this series which addressed Geert's comments. Sorry for missing this and replying to v1. For the whole series,
Quoted 20 lines · Wolfram Sang
There are some more SoCs which cannot handle HS400. Add them and clean up the quirk handling a bit. So, patch 1 is suitable for stable, the rest isn't.
Note that I don't have that HW, so I am relying on the provided information.
Changes since v1 (thanks Geert and Fabrizio!):
* use '[012]' to specify the range instead of single entries
* add RZ/G2M to the listWolfram Sang (3):
mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
mmc: sdhi: improve quirk descriptions
mmc: sdhi: remove unneeded initializationdrivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)Signature · 1 line
2.11.0
Signature · 2 lines
Regards, Niklas Söderlund
Quoted 10 lines · Wolfram Sang
There are some more SoCs which cannot handle HS400. Add them and clean up the quirk handling a bit. So, patch 1 is suitable for stable, the rest isn't.
Note that I don't have that HW, so I am relying on the provided information.
Changes since v1 (thanks Geert and Fabrizio!):
* use '[012]' to specify the range instead of single entries
* add RZ/G2M to the list
Quoted 8 lines
Wolfram Sang (3):
mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
mmc: sdhi: improve quirk descriptions
mmc: sdhi: remove unneeded initializationdrivers/mmc/host/renesas_sdhi_core.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
Applied patch 1 for fixes and by adding a stable tag, the rest is applied for next, thanks!
Kind regards
Uffe