mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
net: stmmac: dwmac-rk: fixes the gmac resume after PD on/off
GMAC Power Domain(PD) will be disabled during suspend. That will causes GRF registers reset. So corresponding GRF registers for GMAC must be setup again. Signed-off-by: Roger Chen <roger.chen@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ba289af802
commit
45383f528f
@ -853,6 +853,16 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
|
||||
"rockchip,grf");
|
||||
bsp_priv->pdev = pdev;
|
||||
|
||||
gmac_clk_init(bsp_priv);
|
||||
|
||||
return bsp_priv;
|
||||
}
|
||||
|
||||
static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
|
||||
{
|
||||
int ret;
|
||||
struct device *dev = &bsp_priv->pdev->dev;
|
||||
|
||||
/*rmii or rgmii*/
|
||||
if (bsp_priv->phy_iface == PHY_INTERFACE_MODE_RGMII) {
|
||||
dev_info(dev, "init for RGMII\n");
|
||||
@ -865,15 +875,6 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
|
||||
dev_err(dev, "NO interface defined!\n");
|
||||
}
|
||||
|
||||
gmac_clk_init(bsp_priv);
|
||||
|
||||
return bsp_priv;
|
||||
}
|
||||
|
||||
static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = phy_power_on(bsp_priv, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user