From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Wolfram Sang <wsa@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Magnus Damm <magnus.damm@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>
Subject: RE: [PATCH 04/14] mmc: renesas_sdhi: Add support for R-Car H3e-2G and M3e-2G
Date: Thu, 24 Jun 2021 10:54:34 +0000 [thread overview]
Message-ID: <TY2PR01MB36927B0CCE7C557A3115E481D8079@TY2PR01MB3692.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <YNQi0w4zsG01ezgu@kunai>
Hi Wolfram-san,
> From: Wolfram Sang, Sent: Thursday, June 24, 2021 3:15 PM
>
> Hi all,
>
> > > > > --- 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?
>
> I don't fully understand how the refactoring should look like? Is it
> moving 'struct renesas_sdhi_quirks' to renesas_sdhi_internal_dmac.c and
> merge it there with renesas_sdhi_of_data? Is it really better to copy
> this struct per SoC? Most of the data is the same.
I also have the same concern. But, I guess we can refactor
the renesas_sdhi_of_data like below to avoid increasing data size:
struct renesas_sdhi_of_data_with_quirks {
const struct renesas_sdhi_of_data *of_data;
const struct renesas_sdhi_quirks *quirks;
};
And then, we can keep of_rcar_gen3_compatible and
we can add each SoC's renesas_sdhi_of_data_with_quirks
and set it to the .data.
Best regards,
Yoshihiro Shimoda
> Thanks,
>
> Wolfram
next prev parent reply other threads:[~2021-06-24 10:54 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 9:37 [PATCH 00/14] arm64: renesas: Add support for R Car H3e 2G-and M3e-2G Geert Uytterhoeven
2021-06-10 9:37 ` [PATCH 01/14] dt-bindings: arm: renesas: Document R-Car H3e-2G and M3e-2G SoCs and boards Geert Uytterhoeven
2021-06-13 1:13 ` Laurent Pinchart
2021-06-14 11:25 ` Geert Uytterhoeven
2021-06-14 18:24 ` Laurent Pinchart
2021-06-16 17:56 ` Rob Herring
2021-06-23 10:01 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 02/14] soc: renesas: Identify R-Car H3e-2G and M3e-2G Geert Uytterhoeven
2021-06-14 18:31 ` Laurent Pinchart
2021-06-23 10:13 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 03/14] pinctrl: renesas: Fix pin control matching on R-Car H3e-2G Geert Uytterhoeven
2021-06-14 18:38 ` Laurent Pinchart
2021-06-14 19:16 ` Geert Uytterhoeven
2021-06-23 10:34 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 04/14] mmc: renesas_sdhi: Add support for R-Car H3e-2G and M3e-2G Geert Uytterhoeven
2021-06-14 18:42 ` Laurent Pinchart
2021-06-14 19:32 ` Geert Uytterhoeven
2021-06-24 2:25 ` Yoshihiro Shimoda
2021-06-24 6:14 ` Wolfram Sang
2021-06-24 10:54 ` Yoshihiro Shimoda [this message]
2021-06-24 15:19 ` Wolfram Sang
2021-06-25 4:54 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 05/14] arm64: dts: renesas: Add Renesas R8A779M1 SoC support Geert Uytterhoeven
2021-06-14 18:43 ` Laurent Pinchart
2021-06-24 4:56 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 06/14] arm64: dts: renesas: Add Renesas R8A779M3 " Geert Uytterhoeven
2021-06-24 5:08 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 07/14] arm64: dts: renesas: Add support for Salvator-XS with R-Car H3e-2G Geert Uytterhoeven
2021-06-14 18:45 ` Laurent Pinchart
2021-06-14 19:34 ` Geert Uytterhoeven
2021-06-24 5:27 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH 08/14] arm64: dts: renesas: Add support for H3ULCB " Geert Uytterhoeven
2021-06-14 18:46 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 09/14] arm64: dts: renesas: Add support for H3ULCB+Kingfisher " Geert Uytterhoeven
2021-06-14 18:46 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 10/14] arm64: dts: renesas: Add support for Salvator-XS with R-Car M3e-2G Geert Uytterhoeven
2021-06-14 18:48 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 11/14] arm64: dts: renesas: Add support for M3ULCB " Geert Uytterhoeven
2021-06-14 18:48 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH 12/14] arm64: dts: renesas: Add support for M3ULCB+Kingfisher " Geert Uytterhoeven
2021-06-14 18:48 ` Laurent Pinchart
2021-06-10 9:37 ` [PATCH/RFC 13/14] arm64: dts: renesas: r8a779m1: Add Cortex-A57 2 GHz opp Geert Uytterhoeven
2021-06-16 11:25 ` Yoshihiro Shimoda
2021-06-10 9:37 ` [PATCH/RFC 14/14] arm64: dts: renesas: r8a779m3: " Geert Uytterhoeven
2021-06-16 11:27 ` Yoshihiro Shimoda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=TY2PR01MB36927B0CCE7C557A3115E481D8079@TY2PR01MB3692.jpnprd01.prod.outlook.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=robh+dt@kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).