return rc;
}
+void internal_phy_remove(struct phy_device *phydev)
+{
+ int value;
+
+ pr_info("internal phy shutdown\n");
+ /*disable link interrupt*/
+ value = phy_read(phydev, 0x1E);
+ phy_write(phydev, 0x1E, value & ~0x50);
+
+ value = 0;
+ value = phy_read(phydev, 0x18);
+ phy_write(phydev, 0x18, value | 0x1);
+}
static struct phy_driver amlogic_internal_driver[] = { {
.phy_id = 0x01814400,
.name = "amlogic internal phy",
.read_status = internal_phy_read_status,
.suspend = internal_phy_suspend,
.resume = internal_phy_resume,
+ .remove = internal_phy_remove,
} };
module_phy_driver(amlogic_internal_driver);
dwmac_meson_disable_analog(&pdev->dev);
}
//stmmac_release(ndev);
+ //stmmac_pltfr_suspend(&pdev->dev);
+ if (priv->phydev) {
+ if (priv->phydev->drv->remove)
+ priv->phydev->drv->remove(ndev->phydev);
+ else
+ genphy_suspend(ndev->phydev);
+ }
stmmac_pltfr_suspend(&pdev->dev);
- if (priv->phydev)
- genphy_suspend(ndev->phydev);
- if (priv->plat->exit)
- priv->plat->exit(pdev, priv->plat->bsp_priv);
}
#endif