diff options
author | Paolo Abeni <[email protected]> | 2024-07-02 15:47:17 +0200 |
---|---|---|
committer | Paolo Abeni <[email protected]> | 2024-07-02 15:47:17 +0200 |
commit | ac26327635d643efe173e7460fa09eb39f0e5c54 (patch) | |
tree | 51a70bea02cd20d629d28f49fcff0a614de52c89 | |
parent | d01e0e98de31f9cc5cf328f5eb7ae3d7a13c1021 (diff) | |
parent | f8dbe58e2f1a3c091531b3f8ef86b393ceee67d1 (diff) |
Merge branch 'fixes-for-stm32-dwmac-driver-fails-to-probe'
Christophe Roullier says:
====================
Fixes for stm32-dwmac driver fails to probe
Mark Brown found issue during stm32-dwmac probe:
For the past few days networking has been broken on the Avenger 96, a
stm32mp157a based platform. The stm32-dwmac driver fails to probe:
<6>[ 1.894271] stm32-dwmac 5800a000.ethernet: IRQ eth_wake_irq not found
<6>[ 1.899694] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found
<6>[ 1.905849] stm32-dwmac 5800a000.ethernet: IRQ sfty not found
<3>[ 1.912304] stm32-dwmac 5800a000.ethernet: Unable to parse OF data
<3>[ 1.918393] stm32-dwmac 5800a000.ethernet: probe with driver stm32-dwmac failed with error -75
which looks a bit odd given the commit contents but I didn't look at the
driver code at all.
Full boot log here:
https://lava.sirena.org.uk/scheduler/job/467150
A working equivalent is here:
https://lava.sirena.org.uk/scheduler/job/466518
I delivered 2 fixes to solve issue.
====================
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c index 23cf0a5b047f..c1732955a697 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c @@ -206,6 +206,9 @@ static int stm32mp1_validate_ethck_rate(struct plat_stmmacenet_data *plat_dat) struct stm32_dwmac *dwmac = plat_dat->bsp_priv; const u32 clk_rate = clk_get_rate(dwmac->clk_eth_ck); + if (!dwmac->enable_eth_ck) + return 0; + switch (plat_dat->mac_interface) { case PHY_INTERFACE_MODE_MII: case PHY_INTERFACE_MODE_GMII: @@ -432,10 +435,12 @@ static int stm32_dwmac_parse_data(struct stm32_dwmac *dwmac, dwmac->mode_mask = SYSCFG_MP1_ETH_MASK; err = of_property_read_u32_index(np, "st,syscon", 2, &dwmac->mode_mask); if (err) { - if (dwmac->ops->is_mp13) + if (dwmac->ops->is_mp13) { dev_err(dev, "Sysconfig register mask must be set (%d)\n", err); - else + } else { dev_dbg(dev, "Warning sysconfig register mask not set\n"); + err = 0; + } } return err; |