From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Emil Renner Berthing <kernel@esmil.dk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Jerome Brunet <jbrunet@baylibre.com>,
Keguang Zhang <keguang.zhang@gmail.com>,
Kevin Hilman <khilman@baylibre.com>,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Minda Chen <minda.chen@starfivetech.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
netdev@vger.kernel.org,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next 11/16] net: stmmac: starfive: use stmmac_get_phy_intf_sel()
Date: Fri, 7 Nov 2025 16:08:57 +0000 [thread overview]
Message-ID: <aQ4ZmXB_eFjKXgIv@shell.armlinux.org.uk> (raw)
In-Reply-To: <CANBLGczzW+kjvSqYm5YVt+2sdLtgyZfa=fhsU1Q-nUjSVvB4cw@mail.gmail.com>
On Fri, Nov 07, 2025 at 11:00:35AM -0500, Emil Renner Berthing wrote:
> Quoting Russell King (Oracle) (2025-11-07 15:28:55)
> > Use stmmac_get_phy_intf_sel() to decode the PHY interface mode to the
> > phy_intf_sel value, validate the result and use that to set the
> > control register to select the operating mode for the DWMAC core.
> >
> > Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> > ---
> > .../ethernet/stmicro/stmmac/dwmac-starfive.c | 22 +++++--------------
> > 1 file changed, 6 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > index 1ef72576c6f1..00078b7a6486 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > @@ -35,25 +35,15 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
> > struct starfive_dwmac *dwmac = plat_dat->bsp_priv;
> > struct regmap *regmap;
> > unsigned int args[2];
> > - unsigned int mode;
> > + int phy_intf_sel;
> > int err;
> >
> > - switch (plat_dat->phy_interface) {
> > - case PHY_INTERFACE_MODE_RMII:
> > - mode = STARFIVE_DWMAC_PHY_INFT_RMII;
> > - break;
> > -
> > - case PHY_INTERFACE_MODE_RGMII:
> > - case PHY_INTERFACE_MODE_RGMII_ID:
> > - case PHY_INTERFACE_MODE_RGMII_RXID:
> > - case PHY_INTERFACE_MODE_RGMII_TXID:
> > - mode = STARFIVE_DWMAC_PHY_INFT_RGMII;
> > - break;
>
> After these two patches the STARFIVE_DWMAC_PHY_INFT_RMII and ..RGMII macros are
> left unused.
Thanks, I'll remove them in this patch.
> Maybe just squash the patches and remove the definitions?
It's two logical changes, thus two patches. Reviewers find that this
makes it easier to review.
Given the number of platform glues that I'm modifying, I don't want
to change some of them using one big all encompassing patch and
others as a set of logical changes - that would be totally insane
to manage.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2025-11-07 16:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 14:27 [PATCH net-next 00/16] net: stmmac: convert glue drivers to use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 01/16] net: stmmac: loongson1: use PHY_INTF_SEL_x Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 02/16] net: stmmac: loongson1: use PHY_INTF_SEL_x directly Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 03/16] net: stmmac: loongson1: use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 04/16] net: stmmac: mediatek: use PHY_INTF_SEL_xxx Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 05/16] net: stmmac: mediatek: use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 06/16] net: stmmac: mediatek: simplify set_interface() methods Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 07/16] net: stmmac: meson8b: use PHY_INTF_SEL_xxx Russell King (Oracle)
2025-11-08 12:30 ` Martin Blumenstingl
2025-11-07 14:28 ` [PATCH net-next 08/16] net: stmmac: meson8b: use phy_intf_sel directly Russell King (Oracle)
2025-11-08 12:30 ` Martin Blumenstingl
2025-11-07 14:28 ` [PATCH net-next 09/16] net: stmmac: meson8b: use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-08 12:31 ` Martin Blumenstingl
2025-11-07 14:28 ` [PATCH net-next 10/16] net: stmmac: starfive: use PHY_INTF_SEL_xxx to select PHY interface Russell King (Oracle)
2025-11-07 14:28 ` [PATCH net-next 11/16] net: stmmac: starfive: use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-07 16:00 ` Emil Renner Berthing
2025-11-07 16:08 ` Russell King (Oracle) [this message]
2025-11-07 14:29 ` [PATCH net-next 12/16] net: stmmac: stm32: use PHY_INTF_SEL_x to select PHY interface Russell King (Oracle)
2025-11-07 14:29 ` [PATCH net-next 13/16] net: stmmac: stm32: use PHY_INTF_SEL_x directly Russell King (Oracle)
2025-11-07 14:29 ` [PATCH net-next 14/16] net: stmmac: stm32: use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-07 14:29 ` [PATCH net-next 15/16] net: stmmac: visconti: use PHY_INTF_SEL_x to select PHY interface Russell King (Oracle)
2025-11-07 14:29 ` [PATCH net-next 16/16] net: stmmac: visconti: use stmmac_get_phy_intf_sel() Russell King (Oracle)
2025-11-07 18:23 ` Maxime Chevallier
2025-11-08 7:58 ` Russell King (Oracle)
2025-11-09 16:38 ` Maxime Chevallier
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=aQ4ZmXB_eFjKXgIv@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=keguang.zhang@gmail.com \
--cc=kernel@esmil.dk \
--cc=khilman@baylibre.com \
--cc=kuba@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=minda.chen@starfivetech.com \
--cc=neil.armstrong@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=nobuhiro.iwamatsu.x90@mail.toshiba \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).