diff options
author | Alexander Couzens | 2022-09-17 02:07:34 +0200 |
---|---|---|
committer | Jakub Kicinski | 2022-09-23 06:58:49 -0700 |
commit | 728c2af6ad8c809f66639b70e4fd8c67c57c66e7 (patch) | |
tree | a74996d7f4b648cd75d0691c33db2b1d6812c61b /drivers/net/dsa | |
parent | 42bc4fafe359ed6b73602b7a2dba0dd99588f8ce (diff) |
net: mt7531: ensure all MACs are powered down before reset
The datasheet [1] explicit describes it as requirement for a reset.
[1] MT7531 Reference Manual for Development Board rev 1.0, page 735
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/mt7530.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 95a57aeb466e..409d5c3d76ea 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2329,6 +2329,10 @@ mt7531_setup(struct dsa_switch *ds) return -ENODEV; } + /* all MACs must be forced link-down before sw reset */ + for (i = 0; i < MT7530_NUM_PORTS; i++) + mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK); + /* Reset the switch through internal reset */ mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST | |