2019-09-20 22:58:51

by Christophe Roullier

[permalink] [raw]
Subject: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimization

Some improvements (manage syscfg as optional clock, update slew rate of
ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
Fix warning build message when W=1

Christophe Roullier (5):
net: ethernet: stmmac: Add support for syscfg clock
net: ethernet: stmmac: fix warning when w=1 option is used during
build
ARM: dts: stm32: remove syscfg clock on stm32mp157c ethernet
ARM: dts: stm32: adjust slew rate for Ethernet
ARM: dts: stm32: Enable gating of the MAC TX clock during TX low-power
mode on stm32mp157c

arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 9 +++-
arch/arm/boot/dts/stm32mp157c.dtsi | 7 ++--
.../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 42 ++++++++++++-------
3 files changed, 38 insertions(+), 20 deletions(-)

--
2.17.1


2019-09-20 22:58:51

by Christophe Roullier

[permalink] [raw]
Subject: [PATCH 2/5] net: ethernet: stmmac: fix warning when w=1 option is used during build

This patch fix the following warning:

warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int val, ret;

Signed-off-by: Christophe Roullier <[email protected]>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
index 7e6619868cc1..167a5e99960a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
@@ -184,7 +184,7 @@ static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
{
struct stm32_dwmac *dwmac = plat_dat->bsp_priv;
u32 reg = dwmac->mode_reg;
- int val, ret;
+ int val;

switch (plat_dat->interface) {
case PHY_INTERFACE_MODE_MII:
@@ -220,8 +220,8 @@ static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
}

/* Need to update PMCCLRR (clear register) */
- ret = regmap_write(dwmac->regmap, reg + SYSCFG_PMCCLRR_OFFSET,
- dwmac->ops->syscfg_eth_mask);
+ regmap_write(dwmac->regmap, reg + SYSCFG_PMCCLRR_OFFSET,
+ dwmac->ops->syscfg_eth_mask);

/* Update PMCSETR (set register) */
return regmap_update_bits(dwmac->regmap, reg,
--
2.17.1

2019-09-20 23:21:43

by Christophe Roullier

[permalink] [raw]
Subject: [PATCH 3/5] ARM: dts: stm32: remove syscfg clock on stm32mp157c ethernet

Syscfg is now activated automatically when syscfg registers are used

Signed-off-by: Christophe Roullier <[email protected]>
---
arch/arm/boot/dts/stm32mp157c.dtsi | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index 0c4e6ebc3529..f51d6222a0e8 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -1285,13 +1285,11 @@
clock-names = "stmmaceth",
"mac-clk-tx",
"mac-clk-rx",
- "ethstp",
- "syscfg-clk";
+ "ethstp";
clocks = <&rcc ETHMAC>,
<&rcc ETHTX>,
<&rcc ETHRX>,
- <&rcc ETHSTP>,
- <&rcc SYSCFG>;
+ <&rcc ETHSTP>;
st,syscon = <&syscfg 0x4>;
snps,mixed-burst;
snps,pbl = <2>;
--
2.17.1

2019-09-25 00:05:18

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimization

On Fri, 20 Sep 2019 07:38:12 +0200, Christophe Roullier wrote:
> Some improvements (manage syscfg as optional clock, update slew rate of
> ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
> Fix warning build message when W=1

There seems to be some new features/cleanups (or improvements as
you say) here. Could you explain the negative impact not applying
these changes will have? Patches 1 and 3 in particular.

net-next is now closed [1], and will reopen some time after the merge
window is over. For now we are only expecting fixes for the net tree.

Could you (a) provide stronger motivation these changes are fixes; or
(b) separate the fixes from improvements?

Thank you!

[1] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

2019-09-25 06:37:43

by Christophe Roullier

[permalink] [raw]
Subject: Re: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimization

Hi Jakub, all,

It is not urgent, no problem to wait next merge window (release 5.5)

For patch 1 and 3, it is improvement/cleanup because now syscfg clock is
not mandatory (I put code backward compatible).

Regards,

Christophe

On 9/23/19 12:12 AM, Jakub Kicinski wrote:
> On Fri, 20 Sep 2019 07:38:12 +0200, Christophe Roullier wrote:
>> Some improvements (manage syscfg as optional clock, update slew rate of
>> ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
>> Fix warning build message when W=1
> There seems to be some new features/cleanups (or improvements as
> you say) here. Could you explain the negative impact not applying
> these changes will have? Patches 1 and 3 in particular.
>
> net-next is now closed [1], and will reopen some time after the merge
> window is over. For now we are only expecting fixes for the net tree.
>
> Could you (a) provide stronger motivation these changes are fixes; or
> (b) separate the fixes from improvements?
>
> Thank you!
>
> [1] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html

2019-10-03 10:17:08

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH 2/5] net: ethernet: stmmac: fix warning when w=1 option is used during build

Hi,

On 9/20/19 7:38 AM, Christophe Roullier wrote:
> This patch fix the following warning:
>
> warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> int val, ret;
>
> Signed-off-by: Christophe Roullier <[email protected]>
> ---

Acked-by: Alexandre TORGUE <[email protected]>

> drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> index 7e6619868cc1..167a5e99960a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c
> @@ -184,7 +184,7 @@ static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
> {
> struct stm32_dwmac *dwmac = plat_dat->bsp_priv;
> u32 reg = dwmac->mode_reg;
> - int val, ret;
> + int val;
>
> switch (plat_dat->interface) {
> case PHY_INTERFACE_MODE_MII:
> @@ -220,8 +220,8 @@ static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
> }
>
> /* Need to update PMCCLRR (clear register) */
> - ret = regmap_write(dwmac->regmap, reg + SYSCFG_PMCCLRR_OFFSET,
> - dwmac->ops->syscfg_eth_mask);
> + regmap_write(dwmac->regmap, reg + SYSCFG_PMCCLRR_OFFSET,
> + dwmac->ops->syscfg_eth_mask);
>
> /* Update PMCSETR (set register) */
> return regmap_update_bits(dwmac->regmap, reg,
>

2019-10-03 10:18:57

by Alexandre Torgue

[permalink] [raw]
Subject: Re: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimization

Hi Christophe

On 9/20/19 7:38 AM, Christophe Roullier wrote:
> Some improvements (manage syscfg as optional clock, update slew rate of
> ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power mode)
> Fix warning build message when W=1
>
> Christophe Roullier (5):
> net: ethernet: stmmac: Add support for syscfg clock
> net: ethernet: stmmac: fix warning when w=1 option is used during
> build
> ARM: dts: stm32: remove syscfg clock on stm32mp157c ethernet
> ARM: dts: stm32: adjust slew rate for Ethernet
> ARM: dts: stm32: Enable gating of the MAC TX clock during TX low-power
> mode on stm32mp157c
>

DT patches will be applied on stm32-next after dwmac-stm32 patches merge
in net-next.

> arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 9 +++-
> arch/arm/boot/dts/stm32mp157c.dtsi | 7 ++--
> .../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 42 ++++++++++++-------
> 3 files changed, 38 insertions(+), 20 deletions(-)
>

2019-10-25 19:33:32

by Christophe Roullier

[permalink] [raw]
Subject: Re: [PATCH 0/5] net: ethernet: stmmac: some fixes and optimization

Hi all,

Just a "gentleman ping" about this series

Regards,

Christophe.

On 9/23/19 9:46 AM, Christophe ROULLIER wrote:
> Hi Jakub, all,
>
> It is not urgent, no problem to wait next merge window (release 5.5)
>
> For patch 1 and 3, it is improvement/cleanup because now syscfg clock
> is not mandatory (I put code backward compatible).
>
> Regards,
>
> Christophe
>
> On 9/23/19 12:12 AM, Jakub Kicinski wrote:
>> On Fri, 20 Sep 2019 07:38:12 +0200, Christophe Roullier wrote:
>>> Some improvements (manage syscfg as optional clock, update slew rate of
>>> ETH_MDIO pin, Enable gating of the MAC TX clock during TX low-power
>>> mode)
>>> Fix warning build message when W=1
>> There seems to be some new features/cleanups (or improvements as
>> you say) here. Could you explain the negative impact not applying
>> these changes will have? Patches 1 and 3 in particular.
>>
>> net-next is now closed [1], and will reopen some time after the merge
>> window is over. For now we are only expecting fixes for the net tree.
>>
>> Could you (a) provide stronger motivation these changes are fixes; or
>> (b) separate the fixes from improvements?
>>
>> Thank you!
>>
>> [1] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html