[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f44537a-3d60-46f5-a159-919cc2a144ec@denx.de>
Date: Fri, 7 Jun 2024 14:48:14 +0200
From: Marek Vasut <marex@...x.de>
To: Christophe Roullier <christophe.roullier@...s.st.com>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Richard Cochran <richardcochran@...il.com>, Jose Abreu
<joabreu@...opsys.com>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 08/12] net: stmmac: dwmac-stm32: add management of
stm32mp13 for stm32
On 6/7/24 11:57 AM, Christophe Roullier wrote:
[...]
> @@ -224,11 +225,18 @@ static int stm32mp1_configure_pmcr(struct plat_stmmacenet_data *plat_dat)
> {
> struct stm32_dwmac *dwmac = plat_dat->bsp_priv;
> u32 reg = dwmac->mode_reg;
> - int val;
> + int val = 0;
Is the initialization really needed ? It seems the switch-case below
does always initialize $val .
> switch (plat_dat->mac_interface) {
> case PHY_INTERFACE_MODE_MII:
> - val = SYSCFG_PMCR_ETH_SEL_MII;
> + /*
> + * STM32MP15xx supports both MII and GMII, STM32MP13xx MII only.
> + * SYSCFG_PMCSETR ETH_SELMII is present only on STM32MP15xx and
> + * acts as a selector between 0:GMII and 1:MII. As STM32MP13xx
> + * supports only MII, ETH_SELMII is not present.
> + */
> + if (!dwmac->ops->is_mp13) /* Select MII mode on STM32MP15xx */
> + val |= SYSCFG_PMCR_ETH_SEL_MII;
> break;
> case PHY_INTERFACE_MODE_GMII:
> val = SYSCFG_PMCR_ETH_SEL_GMII;
[...]
This way of adding MP13 support definitely looks much better.
Also, split the series, drivers/ stuff for netdev (and make sure to
include the net-next patch prefix , git send-email
--subject-prefix="net-next,PATCH") , DTs for linux-arm-kernel , config
patch also for linux-arm-kernel .
Powered by blists - more mailing lists