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 <lynxis@fe80.eu>
This commit is contained in:
Alexander Couzens 2021-06-09 22:55:30 +02:00
parent 56bdb6bb97
commit d50e129399
6 changed files with 7 additions and 7 deletions

View File

@ -1360,7 +1360,7 @@ static int __init fe_init(struct net_device *dev)
const char *mac_addr; const char *mac_addr;
int err; int err;
priv->soc->reset_fe(); priv->soc->reset_fe(priv);
if (priv->soc->switch_init) if (priv->soc->switch_init)
if (priv->soc->switch_init(priv)) { if (priv->soc->switch_init(priv)) {

View File

@ -382,7 +382,7 @@ struct fe_soc_data {
const u16 *reg_table; const u16 *reg_table;
void (*init_data)(struct fe_soc_data *data, struct net_device *netdev); 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); void (*set_mac)(struct fe_priv *priv, unsigned char *mac);
int (*fwd_config)(struct fe_priv *priv); int (*fwd_config)(struct fe_priv *priv);
void (*tx_dma)(struct fe_tx_dma *txd); void (*tx_dma)(struct fe_tx_dma *txd);

View File

@ -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); fe_reset(MT7620A_RESET_FE | MT7620A_RESET_ESW);
} }

View File

@ -33,7 +33,7 @@ static void rt2880_init_data(struct fe_soc_data *data,
/* netdev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM; */ /* 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); fe_reset(RT2880_RESET_FE);
} }

View File

@ -69,7 +69,7 @@ static int rt3050_fwd_config(struct fe_priv *priv)
return 0; return 0;
} }
static void rt305x_fe_reset(void) static void rt305x_fe_reset(struct fe_priv *priv)
{ {
fe_reset(RT305X_RESET_FE); fe_reset(RT305X_RESET_FE);
} }
@ -120,7 +120,7 @@ static void rt5350_tx_dma(struct fe_tx_dma *txd)
txd->txd4 = 0; 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); fe_reset(RT305X_RESET_FE | RT305X_RESET_ESW);
} }

View File

@ -21,7 +21,7 @@
#define RT3883_RSTCTRL_FE BIT(21) #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); fe_reset(RT3883_RSTCTRL_FE);
} }