regmap_update_bits(dwmac->regmap, reg, STID127_RETIME_SRC_MASK, val);
}
-static int sti_dwmac_init(struct platform_device *pdev, void *priv)
+static int sti_dwmac_set_mode(struct sti_dwmac *dwmac)
{
- struct sti_dwmac *dwmac = priv;
struct regmap *regmap = dwmac->regmap;
int iface = dwmac->interface;
u32 reg = dwmac->ctrl_reg;
val = (iface == PHY_INTERFACE_MODE_REVMII) ? 0 : ENMII;
regmap_update_bits(regmap, reg, ENMII_MASK, val);
- dwmac->fix_retime_src(priv, dwmac->speed);
+ dwmac->fix_retime_src(dwmac, dwmac->speed);
return 0;
}
if (ret)
return ret;
- ret = sti_dwmac_init(pdev, plat_dat->bsp_priv);
+ ret = sti_dwmac_set_mode(dwmac);
if (ret)
goto disable_clk;
static int sti_dwmac_resume(struct device *dev)
{
struct sti_dwmac *dwmac = get_stmmac_bsp_priv(dev);
- struct platform_device *pdev = to_platform_device(dev);
clk_prepare_enable(dwmac->clk);
- sti_dwmac_init(pdev, dwmac);
+ sti_dwmac_set_mode(dwmac);
return stmmac_resume(dev);
}