From d50e129399e3e9016b63a2c6757245a5136697d5 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Wed, 9 Jun 2021 22:55:30 +0200 Subject: [PATCH] ramips: ethernet: ralink: add struct fe_priv as context to fe_reset() The fe_reset function direct access the reset controller instead using the reset controller api. In preparation to use the reset controller. Signed-off-by: Alexander Couzens --- .../ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c | 2 +- .../ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h | 2 +- .../ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c | 2 +- .../ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c | 2 +- .../ramips/files/drivers/net/ethernet/ralink/soc_rt3050.c | 4 ++-- .../ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index b6e321b78c0..f0afb4877ab 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -1360,7 +1360,7 @@ static int __init fe_init(struct net_device *dev) const char *mac_addr; int err; - priv->soc->reset_fe(); + priv->soc->reset_fe(priv); if (priv->soc->switch_init) if (priv->soc->switch_init(priv)) { diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h index c8517f9f9d1..eb170986a88 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h @@ -382,7 +382,7 @@ struct fe_soc_data { const u16 *reg_table; void (*init_data)(struct fe_soc_data *data, struct net_device *netdev); - void (*reset_fe)(void); + void (*reset_fe)(struct fe_priv *priv); void (*set_mac)(struct fe_priv *priv, unsigned char *mac); int (*fwd_config)(struct fe_priv *priv); void (*tx_dma)(struct fe_tx_dma *txd); diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c index 1ca597470c4..42685eebc33 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_mt7620.c @@ -294,7 +294,7 @@ static void mt7620_port_init(struct fe_priv *priv, struct device_node *np) } } -static void mt7620_fe_reset(void) +static void mt7620_fe_reset(struct fe_priv *priv) { fe_reset(MT7620A_RESET_FE | MT7620A_RESET_ESW); } diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c index 6c89c997d92..ab3ac1e4f37 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt2880.c @@ -33,7 +33,7 @@ static void rt2880_init_data(struct fe_soc_data *data, /* netdev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM; */ } -void rt2880_fe_reset(void) +void rt2880_fe_reset(struct fe_priv *priv) { fe_reset(RT2880_RESET_FE); } 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 914b81410e5..cdc27e056b6 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 @@ -69,7 +69,7 @@ static int rt3050_fwd_config(struct fe_priv *priv) return 0; } -static void rt305x_fe_reset(void) +static void rt305x_fe_reset(struct fe_priv *priv) { fe_reset(RT305X_RESET_FE); } @@ -120,7 +120,7 @@ static void rt5350_tx_dma(struct fe_tx_dma *txd) txd->txd4 = 0; } -static void rt5350_fe_reset(void) +static void rt5350_fe_reset(struct fe_priv *priv) { fe_reset(RT305X_RESET_FE | RT305X_RESET_ESW); } diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c index 4935b7fbd43..afcc3da4e45 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/soc_rt3883.c @@ -21,7 +21,7 @@ #define RT3883_RSTCTRL_FE BIT(21) -static void rt3883_fe_reset(void) +static void rt3883_fe_reset(struct fe_priv *priv) { fe_reset(RT3883_RSTCTRL_FE); } -- 2.30.2