diff mbox series

[04/14] mmc: renesas_sdhi: Add support for R-Car H3e-2G and M3e-2G

Message ID 22b4c393bf5074b53791d2797d8fe74deb8ea9a7.1623315732.git.geert+renesas@glider.be (mailing list archive)
State New
Delegated to: Geert Uytterhoeven
Headers show
Series arm64: renesas: Add support for R Car H3e 2G-and M3e-2G | expand

Commit Message

Geert Uytterhoeven June 10, 2021, 9:37 a.m. UTC
Add support for the R-Car H3e-2G (R8A779M1) and M3e-2G (R8A779M3) SoCs.
These are different gradings of the R-Car H3 ES3.0 (R8A77951) and M3-W+
(R8A77961) SoCs, and thus subject to the same quirks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mmc/host/renesas_sdhi_core.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Laurent Pinchart June 14, 2021, 6:42 p.m. UTC | #1
Hi Geert,

Thank you for the patch.

On Thu, Jun 10, 2021 at 11:37:17AM +0200, Geert Uytterhoeven wrote:
> Add support for the R-Car H3e-2G (R8A779M1) and M3e-2G (R8A779M3) SoCs.
> These are different gradings of the R-Car H3 ES3.0 (R8A77951) and M3-W+
> (R8A77961) SoCs, and thus subject to the same quirks.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/mmc/host/renesas_sdhi_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index b719eda6b8619453..0478c9d58b965392 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -943,6 +943,8 @@ static const struct soc_device_attribute sdhi_quirks_match[]  = {
>  	{ .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
>  	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
>  	{ .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },
> +	{ .soc_id = "r8a779m1", .data = &sdhi_quirks_bad_taps2367 },
> +	{ .soc_id = "r8a779m3", .data = &sdhi_quirks_bad_taps1357 },

Could we reuse the entries for H3 and M3 instead, by dropping the
"ES3.*" revision ?

>  	{ /* Sentinel. */ },
>  };
>
Geert Uytterhoeven June 14, 2021, 7:32 p.m. UTC | #2
Hi Laurent,

On Mon, Jun 14, 2021 at 8:42 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Thu, Jun 10, 2021 at 11:37:17AM +0200, Geert Uytterhoeven wrote:
> > Add support for the R-Car H3e-2G (R8A779M1) and M3e-2G (R8A779M3) SoCs.
> > These are different gradings of the R-Car H3 ES3.0 (R8A77951) and M3-W+
> > (R8A77961) SoCs, and thus subject to the same quirks.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

> > --- a/drivers/mmc/host/renesas_sdhi_core.c
> > +++ b/drivers/mmc/host/renesas_sdhi_core.c
> > @@ -943,6 +943,8 @@ static const struct soc_device_attribute sdhi_quirks_match[]  = {
> >       { .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
> >       { .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
> >       { .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },
> > +     { .soc_id = "r8a779m1", .data = &sdhi_quirks_bad_taps2367 },
> > +     { .soc_id = "r8a779m3", .data = &sdhi_quirks_bad_taps1357 },
>
> Could we reuse the entries for H3 and M3 instead, by dropping the
> "ES3.*" revision ?

We cannot reuse the H3 ES3.0 entry, as soc_device_match()
works differently than of_machine_is_compatible(): the former doesn't
consider "r8a779m1" and "r8a7795" equivalent, the latter does.
Same for M3-W+ (no explicit ES3.0 there) and M3e-2G.

It's a pity we still don't have a "quirk-free" SDHI version on H3
and M3-W class SoCs (waiting for ES4.0?), as that would allow us to
just match on "renesas,sdhi-r8a7795" resp. "renesas,sdhi-r8a77961"
through the driver's .of_match_table[] instead, which would work for
H3e-2G and M3e-2G, too.

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index b719eda6b8619453..0478c9d58b965392 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -943,6 +943,8 @@  static const struct soc_device_attribute sdhi_quirks_match[]  = {
 	{ .soc_id = "r8a77965", .data = &sdhi_quirks_r8a77965 },
 	{ .soc_id = "r8a77980", .data = &sdhi_quirks_nohs400 },
 	{ .soc_id = "r8a77990", .data = &sdhi_quirks_r8a77990 },
+	{ .soc_id = "r8a779m1", .data = &sdhi_quirks_bad_taps2367 },
+	{ .soc_id = "r8a779m3", .data = &sdhi_quirks_bad_taps1357 },
 	{ /* Sentinel. */ },
 };