提交 d93b07f8 编写于 作者: L LABBE Corentin 提交者: David S. Miller

net: stmmac: revert "support future possible different internal phy mode"

Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i.
Furthermore, all DT patchs which comes with this patch were cleaned, so
the current state is broken.
This reverts commit 1c2fa5f8 ("net: stmmac: support future possible different internal phy mode")

Fixes: 1c2fa5f8 ("net: stmmac: support future possible different internal phy mode")
Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c70d6815
...@@ -638,7 +638,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv) ...@@ -638,7 +638,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
{ {
struct sunxi_priv_data *gmac = priv->plat->bsp_priv; struct sunxi_priv_data *gmac = priv->plat->bsp_priv;
struct device_node *node = priv->device->of_node; struct device_node *node = priv->device->of_node;
int ret, phy_interface; int ret;
u32 reg, val; u32 reg, val;
regmap_read(gmac->regmap, SYSCON_EMAC_REG, &val); regmap_read(gmac->regmap, SYSCON_EMAC_REG, &val);
...@@ -718,11 +718,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv) ...@@ -718,11 +718,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
if (gmac->variant->support_rmii) if (gmac->variant->support_rmii)
reg &= ~SYSCON_RMII_EN; reg &= ~SYSCON_RMII_EN;
phy_interface = priv->plat->interface; switch (priv->plat->interface) {
/* if PHY is internal, select the mode (xMII) used by the SoC */
if (gmac->use_internal_phy)
phy_interface = gmac->variant->internal_phy;
switch (phy_interface) {
case PHY_INTERFACE_MODE_MII: case PHY_INTERFACE_MODE_MII:
/* default */ /* default */
break; break;
...@@ -936,7 +932,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev) ...@@ -936,7 +932,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
} }
plat_dat->interface = of_get_phy_mode(dev->of_node); plat_dat->interface = of_get_phy_mode(dev->of_node);
if (plat_dat->interface == PHY_INTERFACE_MODE_INTERNAL) { if (plat_dat->interface == gmac->variant->internal_phy) {
dev_info(&pdev->dev, "Will use internal PHY\n"); dev_info(&pdev->dev, "Will use internal PHY\n");
gmac->use_internal_phy = true; gmac->use_internal_phy = true;
gmac->ephy_clk = of_clk_get(plat_dat->phy_node, 0); gmac->ephy_clk = of_clk_get(plat_dat->phy_node, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册