mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
net: stmmac: Change first parameter of fix_soc_reset()
In order to use netdev_err() to print message in the callback function of fix_soc_reset(), change fix_soc_reset() to have "struct stmmac_priv *" as its first parameter. This is preparation for later patch, no functionality change. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Link: https://patch.msgid.link/20250811073506.27513-3-yangtiezhu@loongson.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6896c2449a
commit
139235103f
|
|
@ -49,7 +49,7 @@ struct imx_dwmac_ops {
|
|||
u32 flags;
|
||||
bool mac_rgmii_txclk_auto_adj;
|
||||
|
||||
int (*fix_soc_reset)(void *priv, void __iomem *ioaddr);
|
||||
int (*fix_soc_reset)(struct stmmac_priv *priv, void __iomem *ioaddr);
|
||||
int (*set_intf_mode)(struct plat_stmmacenet_data *plat_dat);
|
||||
void (*fix_mac_speed)(void *priv, int speed, unsigned int mode);
|
||||
};
|
||||
|
|
@ -265,9 +265,9 @@ static void imx93_dwmac_fix_speed(void *priv, int speed, unsigned int mode)
|
|||
writel(old_ctrl, dwmac->base_addr + MAC_CTRL_REG);
|
||||
}
|
||||
|
||||
static int imx_dwmac_mx93_reset(void *priv, void __iomem *ioaddr)
|
||||
static int imx_dwmac_mx93_reset(struct stmmac_priv *priv, void __iomem *ioaddr)
|
||||
{
|
||||
struct plat_stmmacenet_data *plat_dat = priv;
|
||||
struct plat_stmmacenet_data *plat_dat = priv->plat;
|
||||
u32 value = readl(ioaddr + DMA_BUS_MODE);
|
||||
|
||||
/* DMA SW reset */
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ static int loongson_dwmac_acpi_config(struct pci_dev *pdev,
|
|||
}
|
||||
|
||||
/* Loongson's DWMAC device may take nearly two seconds to complete DMA reset */
|
||||
static int loongson_dwmac_fix_reset(void *priv, void __iomem *ioaddr)
|
||||
static int loongson_dwmac_fix_reset(struct stmmac_priv *priv, void __iomem *ioaddr)
|
||||
{
|
||||
u32 value = readl(ioaddr + DMA_BUS_MODE);
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int stmmac_reset(struct stmmac_priv *priv, void __iomem *ioaddr)
|
|||
return -EINVAL;
|
||||
|
||||
if (plat && plat->fix_soc_reset)
|
||||
return plat->fix_soc_reset(plat, ioaddr);
|
||||
return plat->fix_soc_reset(priv, ioaddr);
|
||||
|
||||
return stmmac_do_callback(priv, dma, reset, ioaddr);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ struct plat_stmmacenet_data {
|
|||
int (*set_clk_tx_rate)(void *priv, struct clk *clk_tx_i,
|
||||
phy_interface_t interface, int speed);
|
||||
void (*fix_mac_speed)(void *priv, int speed, unsigned int mode);
|
||||
int (*fix_soc_reset)(void *priv, void __iomem *ioaddr);
|
||||
int (*fix_soc_reset)(struct stmmac_priv *priv, void __iomem *ioaddr);
|
||||
int (*serdes_powerup)(struct net_device *ndev, void *priv);
|
||||
void (*serdes_powerdown)(struct net_device *ndev, void *priv);
|
||||
int (*mac_finish)(struct net_device *ndev,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user