[openwrt/openwrt] ramips: ethernet: ralink: move reset of the esw into the esw instead of fe
LEDE Commits
lede-commits at lists.infradead.org
Fri Jun 25 04:02:29 PDT 2021
lynxis pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/60fadae62b64b14faff818e4156d9c6eb3f96b65
commit 60fadae62b64b14faff818e4156d9c6eb3f96b65
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Thu Jun 10 00:16:53 2021 +0200
ramips: ethernet: ralink: move reset of the esw into the esw instead of fe
The esw reset should only done by the esw driver and not by the fe itself.
Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
target/linux/ramips/dts/mt7628an.dtsi | 4 ++--
target/linux/ramips/dts/rt5350.dtsi | 4 ++--
.../linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c | 2 ++
.../linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c | 9 ---------
4 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi
index 9bf20cecdd..0dafdc790e 100644
--- a/target/linux/ramips/dts/mt7628an.dtsi
+++ b/target/linux/ramips/dts/mt7628an.dtsi
@@ -429,8 +429,8 @@
interrupt-parent = <&cpuintc>;
interrupts = <5>;
- resets = <&rstctrl 21 &rstctrl 23>;
- reset-names = "fe", "esw";
+ resets = <&rstctrl 21>;
+ reset-names = "fe";
mediatek,switch = <&esw>;
};
diff --git a/target/linux/ramips/dts/rt5350.dtsi b/target/linux/ramips/dts/rt5350.dtsi
index 1058069016..090e755743 100644
--- a/target/linux/ramips/dts/rt5350.dtsi
+++ b/target/linux/ramips/dts/rt5350.dtsi
@@ -343,8 +343,8 @@
compatible = "ralink,rt5350-eth";
reg = <0x10100000 0x10000>;
- resets = <&rstctrl 21 &rstctrl 23>;
- reset-names = "fe", "esw";
+ resets = <&rstctrl 21>;
+ reset-names = "fe";
interrupt-parent = <&cpuintc>;
interrupts = <5>;
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
index cd6ae07595..4a7dbb2d03 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3050.c
@@ -462,6 +462,8 @@ static void esw_hw_init(struct rt305x_esw *esw)
u8 port_disable = 0;
u8 port_map = RT305X_ESW_PMAP_LLLLLL;
+ esw_reset(esw);
+
/* vodoo from original driver */
esw_w32(esw, 0xC8A07850, RT305X_ESW_REG_FCT0);
esw_w32(esw, 0x00000000, RT305X_ESW_REG_SGC2);
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c
index 6aedf0265a..f98d7ec3da 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c
@@ -19,9 +19,6 @@
#include "mtk_eth_soc.h"
#include "mdio_rt2880.h"
-#define RT305X_RESET_FE BIT(21)
-#define RT305X_RESET_ESW BIT(23)
-
static const u16 rt5350_reg_table[FE_REG_COUNT] = {
[FE_REG_PDMA_GLO_CFG] = RT5350_PDMA_GLO_CFG,
[FE_REG_PDMA_RST_CFG] = RT5350_PDMA_RST_CFG,
@@ -115,11 +112,6 @@ static void rt5350_tx_dma(struct fe_tx_dma *txd)
txd->txd4 = 0;
}
-static void rt5350_fe_reset(struct fe_priv *priv)
-{
- fe_reset(RT305X_RESET_FE | RT305X_RESET_ESW);
-}
-
static struct fe_soc_data rt3050_data = {
.init_data = rt305x_init_data,
.fwd_config = rt3050_fwd_config,
@@ -133,7 +125,6 @@ static struct fe_soc_data rt3050_data = {
static struct fe_soc_data rt5350_data = {
.init_data = rt5350_init_data,
.reg_table = rt5350_reg_table,
- .reset_fe = rt5350_fe_reset,
.set_mac = rt5350_set_mac,
.fwd_config = rt5350_fwd_config,
.tx_dma = rt5350_tx_dma,
More information about the lede-commits
mailing list