提交 0f400a87 编写于 作者: J Joachim Eastwood 提交者: David S. Miller

stmmac: dwmac-socfpga: kill init() and rename setup() to set_phy_mode()

Remove old init callback which now contains only a call to
socfpga_dwmac_setup(). Also rename socfpga_dwmac_setup() to indicate
what the function really does.
Signed-off-by: NJoachim Eastwood <manabian@gmail.com>
Tested-by: NMarek Vasut <marex@denx.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 53737247
...@@ -136,7 +136,7 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device * ...@@ -136,7 +136,7 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *
return 0; return 0;
} }
static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac) static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
{ {
struct regmap *sys_mgr_base_addr = dwmac->sys_mgr_base_addr; struct regmap *sys_mgr_base_addr = dwmac->sys_mgr_base_addr;
int phymode = dwmac->interface; int phymode = dwmac->interface;
...@@ -195,16 +195,6 @@ static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac) ...@@ -195,16 +195,6 @@ static int socfpga_dwmac_setup(struct socfpga_dwmac *dwmac)
return 0; return 0;
} }
static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
{
struct socfpga_dwmac *dwmac = priv;
/* Setup the phy mode in the system manager registers according to
* devicetree configuration
*/
return socfpga_dwmac_setup(dwmac);
}
static int socfpga_dwmac_probe(struct platform_device *pdev) static int socfpga_dwmac_probe(struct platform_device *pdev)
{ {
struct plat_stmmacenet_data *plat_dat; struct plat_stmmacenet_data *plat_dat;
...@@ -245,7 +235,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev) ...@@ -245,7 +235,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
*/ */
dwmac->stmmac_rst = stpriv->stmmac_rst; dwmac->stmmac_rst = stpriv->stmmac_rst;
ret = socfpga_dwmac_init(pdev, dwmac); ret = socfpga_dwmac_set_phy_mode(dwmac);
} }
return ret; return ret;
...@@ -254,11 +244,10 @@ static int socfpga_dwmac_probe(struct platform_device *pdev) ...@@ -254,11 +244,10 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int socfpga_dwmac_resume(struct device *dev) static int socfpga_dwmac_resume(struct device *dev)
{ {
struct platform_device *pdev = to_platform_device(dev);
struct net_device *ndev = dev_get_drvdata(dev); struct net_device *ndev = dev_get_drvdata(dev);
struct stmmac_priv *priv = netdev_priv(ndev); struct stmmac_priv *priv = netdev_priv(ndev);
socfpga_dwmac_init(pdev, priv->plat->bsp_priv); socfpga_dwmac_set_phy_mode(priv->plat->bsp_priv);
/* Before the enet controller is suspended, the phy is suspended. /* Before the enet controller is suspended, the phy is suspended.
* This causes the phy clock to be gated. The enet controller is * This causes the phy clock to be gated. The enet controller is
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册