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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert-san,

> From: Geert Uytterhoeven, Sent: Tuesday, June 15, 2021 4:32 AM
> 
> Hi Laurent,
> 
> On Mon, Jun 14, 2021 at 8:42 PM Laurent Pinchart 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@xxxxxxxxx>
> 
> > > --- 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.

Perhaps, ES4.0 will not be released. So, we can refactor the driver's
.of_match_table[] now. I investigated this a little, and it seems
we need many renesas_sdhi_of_data for each SoC instead of
of_rcar_gen3_compatible. But, I guess such modification is better
than adding sdhi_quirks_match entries.

Wolfram-san, what do you thinks?

Best regards,
Yoshihiro Shimoda





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux