From: Romain Gantois <romain.gantois@bootlin.com>
To: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Chen Wang" <unicorn_wang@outlook.com>,
"Inochi Amaoto" <inochiama@outlook.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Richard Cochran" <richardcochran@gmail.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Emil Renner Berthing" <emil.renner.berthing@canonical.com>,
"Jisheng Zhang" <jszhang@kernel.org>,
"Jan Petrous (OSS)" <jan.petrous@oss.nxp.com>,
"Clément Léger" <clement.leger@bootlin.com>,
"Simon Horman" <horms@kernel.org>, "Furong Xu" <0x1207@gmail.com>,
"Serge Semin" <fancer.lancer@gmail.com>,
"Lothar Rubusch" <l.rubusch@gmail.com>,
"Suraj Jaiswal" <quic_jsuraj@quicinc.com>,
"Joe Hattori" <joe@pf.is.s.u-tokyo.ac.jp>,
"Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>,
"Giuseppe Cavallaro" <peppe.cavallaro@st.com>,
"Jose Abreu" <joabreu@synopsys.com>,
"Inochi Amaoto" <inochiama@gmail.com>
Cc: Inochi Amaoto <inochiama@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, Yixun Lan <dlan@gentoo.org>,
Longbin Li <looong.bin@gmail.com>
Subject: Re: [PATCH net-next v4 2/3] net: stmmac: platform: Add snps,dwmac-5.30a IP compatible string
Date: Mon, 10 Feb 2025 11:04:40 +0100 [thread overview]
Message-ID: <5868742.DvuYhMxLoT@fw-rgant> (raw)
In-Reply-To: <20250209013054.816580-3-inochiama@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
On dimanche 9 février 2025 02:30:51 heure normale d’Europe centrale Inochi
Amaoto wrote:
> Add "snps,dwmac-5.30a" compatible string for 5.30a version that can avoid
> to define some platform data in the glue layer.
>
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> ---
> .../ethernet/stmicro/stmmac/stmmac_platform.c | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index
> d0e61aa1a495..8dc3bd6946c6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -405,6 +405,17 @@ static int stmmac_of_get_mac_mode(struct device_node
> *np) return -ENODEV;
> }
>
> +/* Compatible string array for all gmac4 devices */
> +static const char * const stmmac_gmac4_compats[] = {
> + "snps,dwmac-4.00",
> + "snps,dwmac-4.10a",
> + "snps,dwmac-4.20a",
> + "snps,dwmac-5.10a",
> + "snps,dwmac-5.20",
> + "snps,dwmac-5.30a",
> + NULL
> +};
> +
> /**
> * stmmac_probe_config_dt - parse device-tree driver parameters
> * @pdev: platform_device structure
> @@ -538,11 +549,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8
> *mac) plat->pmt = 1;
> }
>
> - if (of_device_is_compatible(np, "snps,dwmac-4.00") ||
> - of_device_is_compatible(np, "snps,dwmac-4.10a") ||
> - of_device_is_compatible(np, "snps,dwmac-4.20a") ||
> - of_device_is_compatible(np, "snps,dwmac-5.10a") ||
> - of_device_is_compatible(np, "snps,dwmac-5.20")) {
> + if (of_device_compatible_match(np, stmmac_gmac4_compats)) {
> plat->has_gmac4 = 1;
> plat->has_gmac = 0;
> plat->pmt = 1;
LGTM
Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-02-10 10:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-09 1:30 [PATCH net-next v4 0/3] riscv: sophgo: Add ethernet support for SG2044 Inochi Amaoto
2025-02-09 1:30 ` [PATCH net-next v4 1/3] dt-bindings: net: Add support for Sophgo SG2044 dwmac Inochi Amaoto
2025-02-09 1:30 ` [PATCH net-next v4 2/3] net: stmmac: platform: Add snps,dwmac-5.30a IP compatible string Inochi Amaoto
2025-02-10 10:04 ` Romain Gantois [this message]
2025-02-09 1:30 ` [PATCH net-next v4 3/3] net: stmmac: Add glue layer for Sophgo SG2044 SoC Inochi Amaoto
2025-02-10 11:01 ` Romain Gantois
2025-02-11 0:47 ` Inochi Amaoto
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=5868742.DvuYhMxLoT@fw-rgant \
--to=romain.gantois@bootlin.com \
--cc=0x1207@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=aou@eecs.berkeley.edu \
--cc=bartosz.golaszewski@linaro.org \
--cc=clement.leger@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=edumazet@google.com \
--cc=emil.renner.berthing@canonical.com \
--cc=fancer.lancer@gmail.com \
--cc=horms@kernel.org \
--cc=inochiama@gmail.com \
--cc=inochiama@outlook.com \
--cc=jan.petrous@oss.nxp.com \
--cc=joabreu@synopsys.com \
--cc=joe@pf.is.s.u-tokyo.ac.jp \
--cc=jszhang@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=l.rubusch@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=looong.bin@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peppe.cavallaro@st.com \
--cc=quic_jsuraj@quicinc.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=unicorn_wang@outlook.com \
/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