From: Alexander Couzens Date: Wed, 9 Jun 2021 20:55:30 +0000 (+0200) Subject: ramips: ethernet: ralink: add struct fe_priv as context to fe_reset() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d50e129399e3e9016b63a2c6757245a5136697d5;p=openwrt%2Fstaging%2Fdangole.git 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 --- 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 b6e321b78c..f0afb4877a 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 c8517f9f9d..eb170986a8 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 1ca597470c..42685eebc3 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 6c89c997d9..ab3ac1e4f3 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 914b81410e..cdc27e056b 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 4935b7fbd4..afcc3da4e4 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); }