Skip to content

Commit d93b07f

Browse files
montjoiedavem330
authored andcommitted
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 1c2fa5f ("net: stmmac: support future possible different internal phy mode") Fixes: 1c2fa5f ("net: stmmac: support future possible different internal phy mode") Signed-off-by: Corentin Labbe <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c70d681 commit d93b07f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
638638
{
639639
struct sunxi_priv_data *gmac = priv->plat->bsp_priv;
640640
struct device_node *node = priv->device->of_node;
641-
int ret, phy_interface;
641+
int ret;
642642
u32 reg, val;
643643

644644
regmap_read(gmac->regmap, SYSCON_EMAC_REG, &val);
@@ -718,11 +718,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
718718
if (gmac->variant->support_rmii)
719719
reg &= ~SYSCON_RMII_EN;
720720

721-
phy_interface = priv->plat->interface;
722-
/* if PHY is internal, select the mode (xMII) used by the SoC */
723-
if (gmac->use_internal_phy)
724-
phy_interface = gmac->variant->internal_phy;
725-
switch (phy_interface) {
721+
switch (priv->plat->interface) {
726722
case PHY_INTERFACE_MODE_MII:
727723
/* default */
728724
break;
@@ -936,7 +932,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
936932
}
937933

938934
plat_dat->interface = of_get_phy_mode(dev->of_node);
939-
if (plat_dat->interface == PHY_INTERFACE_MODE_INTERNAL) {
935+
if (plat_dat->interface == gmac->variant->internal_phy) {
940936
dev_info(&pdev->dev, "Will use internal PHY\n");
941937
gmac->use_internal_phy = true;
942938
gmac->ephy_clk = of_clk_get(plat_dat->phy_node, 0);

0 commit comments

Comments
 (0)