mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 09:21:35 +00:00
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From 0693b80f40dbfdb4cae03dca3c7536017606533e Mon Sep 17 00:00:00 2001
|
|
From: Alexander Couzens <lynxis@fe80.eu>
|
|
Date: Thu, 16 Mar 2023 18:00:06 +0530
|
|
Subject: [PATCH 080/281] OpenWrt:
|
|
723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
|
|
|
|
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>
|
|
|
|
Change-Id: I1c489088728fee0860eb3c1c16a2804406e42a3a
|
|
Signed-off-by: Ram Chandra Jangir <quic_rjangir@quicinc.com>
|
|
---
|
|
drivers/net/dsa/mt7530.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
|
|
index a884f6f6a8c2..093b30a342aa 100644
|
|
--- a/drivers/net/dsa/mt7530.c
|
|
+++ b/drivers/net/dsa/mt7530.c
|
|
@@ -2196,6 +2196,10 @@ mt7530_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 |
|
|
--
|
|
2.17.1
|
|
|