[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZZV2s/TGKanl76TI@shell.armlinux.org.uk>
Date: Wed, 3 Jan 2024 15:01:07 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>, Andrew Lunn <andrew@...n.ch>,
Jakub Kicinski <kuba@...nel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Clément Léger <clement.leger@...tlin.com>,
Marek Vasut <marex@...x.de>, Clark Wang <xiaoning.wang@....com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Sylvain Girard <sylvain.girard@...com>,
Pascal EBERHARD <pascal.eberhard@...com>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH net 5/5] net: pcs: rzn1-miic: Init RX clock early if MAC
requires it
On Wed, Jan 03, 2024 at 03:28:25PM +0100, Romain Gantois wrote:
> The GMAC1 controller in the RZN1 IP requires the RX MII clock signal to be
> started before it initializes its own hardware, thus before it calls
> phylink_start.
>
> Check the rxc_always_on pcs flag and enable the clock signal during the
> link validation phase.
However, validation is *not* supposed to change the configuration of
the hardware. Validation may fail. The "interface" that gets passed
to validation may never ever be selected. This change feels like
nothing more than a hack.
Since the MAC driver has to itself provide the PCS to phylink via the
mac_select_pcs() method, the MAC driver already has knowledge of which
PCS it is going to be using. Therefore, I think it may make sense
to do something like this:
int phylink_pcs_preconfig(struct phylink *pl, struct phylink_pcs *pcs)
{
if (pl->config->mac_requires_rxc)
pcs->rxc_always_on = true;
if (pcs->ops->preconfig)
pcs->ops->pcs_preconfig(pcs);
}
and have stmmac call phylink_pcs_preconfig() for each PCS that it will
be using during initialisation / resume paths?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists