diff options
author | John Crispin <john@phrozen.org> | 2016-06-03 10:17:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-03 19:54:16 -0400 |
commit | 0c72c50f6f93b0c3daa9ea35d89ab3a933c7b5a0 (patch) | |
tree | 3339bda584a7dd8b602bc5959b90134a5e4b4fac /drivers/net | |
parent | 08ef55c6f257acf3bdc6940813f80e8f0f5d90ec (diff) | |
download | linux-stable-0c72c50f6f93b0c3daa9ea35d89ab3a933c7b5a0.tar.gz linux-stable-0c72c50f6f93b0c3daa9ea35d89ab3a933c7b5a0.tar.bz2 linux-stable-0c72c50f6f93b0c3daa9ea35d89ab3a933c7b5a0.zip |
net-next: mediatek: add fixed-phy support
The MT7623 SoC has a builtin gigabit switch. If we want to use it, GMAC1
needs to be configured using a fixed link speed and flow control settings.
The easiest way to do this is to used the fixed-phy driver, allowing us to
reuse the existing mdio polling code to setup the MAC.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index b0652f6182f4..231d28444a54 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac) u32 val, ge_mode; np = of_parse_phandle(mac->of_node, "phy-handle", 0); + if (!np && of_phy_is_fixed_link(mac->of_node)) + if (!of_phy_register_fixed_link(mac->of_node)) + np = of_node_get(mac->of_node); if (!np) return -ENODEV; |