From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Emil Renner Berthing <kernel@esmil.dk>,
Eric Dumazet <edumazet@google.com>,
Fabio Estevam <festevam@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, NXP Linux Team <linux-imx@nxp.com>,
Paolo Abeni <pabeni@redhat.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Samin Guo <samin.guo@starfivetech.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Subject: [PATCH net-next 0/6] net: stmmac: add and use library for setting clock
Date: Mon, 11 Sep 2023 16:28:16 +0100 [thread overview]
Message-ID: <ZP8yEFWn0Ml3ALWq@shell.armlinux.org.uk> (raw)
Hi,
There is a common theme throughout several "bsps" in the stmmac driver
which all code up the same thing: for 10M, 100M and 1G, select the
appropriate 2.5MHz, 25MHz, or 125MHz clock.
Rather than having every BSP implement the same thing but slightly
differently, let's provide a single implementation which is passed
the struct clk and the speed, and have that do the speed to clock
rate decode.
Note: only build tested.
drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +-
.../ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 37 ++++---------
drivers/net/ethernet/stmicro/stmmac/dwmac-imx.c | 27 +++-------
.../net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 35 ++++---------
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 61 ++++++----------------
.../net/ethernet/stmicro/stmmac/dwmac-starfive.c | 29 +++-------
.../net/ethernet/stmicro/stmmac/stmmac_plat_lib.c | 29 ++++++++++
.../net/ethernet/stmicro/stmmac/stmmac_plat_lib.h | 8 +++
8 files changed, 91 insertions(+), 137 deletions(-)
create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_plat_lib.c
create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_plat_lib.h
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-09-11 15:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 15:28 Russell King (Oracle) [this message]
2023-09-11 15:29 ` [PATCH net-next 1/6] net: stmmac: add platform library Russell King (Oracle)
2023-09-12 10:18 ` Paolo Abeni
2023-09-12 14:52 ` Simon Horman
2023-09-12 22:20 ` Russell King (Oracle)
2023-09-14 11:24 ` Simon Horman
2023-09-11 15:29 ` [PATCH net-next 2/6] net: stmmac: imx: use dwmac_set_tx_clk_gmii() Russell King (Oracle)
2023-09-14 12:05 ` Serge Semin
2023-09-14 12:19 ` Serge Semin
2023-09-11 15:29 ` [PATCH net-next 3/6] net: stmmac: intel-plat: " Russell King (Oracle)
2023-09-14 12:06 ` Serge Semin
2023-09-11 15:29 ` [PATCH net-next 4/6] net: stmmac: rk: " Russell King (Oracle)
2023-09-11 15:29 ` [PATCH net-next 5/6] net: stmmac: starfive: " Russell King (Oracle)
2023-09-14 12:10 ` Serge Semin
2023-09-11 15:29 ` [PATCH net-next 6/6] net: stmmac: qos-eth: " Russell King (Oracle)
2023-09-14 12:13 ` Serge Semin
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=ZP8yEFWn0Ml3ALWq@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=hawk@kernel.org \
--cc=joabreu@synopsys.com \
--cc=john.fastabend@gmail.com \
--cc=kernel@esmil.dk \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=s.hauer@pengutronix.de \
--cc=samin.guo@starfivetech.com \
--cc=shawnguo@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).