提交 d1d372e8 编写于 作者: S Srikanth Thokala 提交者: David S. Miller

net: axienet: Support for RGMII

This patch adds support for the RGMII. The h/w configuration
parameter C_PHY_TYPE, which represents the interface configured in
the design, is used to differentiate various interfaces supported
by AXI Ethernet.
Signed-off-by: NSrikanth Thokala <sthokal@xilinx.com>
Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c60cd8c5
...@@ -925,9 +925,16 @@ static int axienet_open(struct net_device *ndev) ...@@ -925,9 +925,16 @@ static int axienet_open(struct net_device *ndev)
return ret; return ret;
if (lp->phy_node) { if (lp->phy_node) {
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node, if (lp->phy_type == XAE_PHY_TYPE_GMII) {
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
axienet_adjust_link, 0, axienet_adjust_link, 0,
PHY_INTERFACE_MODE_GMII); PHY_INTERFACE_MODE_GMII);
} else if (lp->phy_type == XAE_PHY_TYPE_RGMII_2_0) {
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
axienet_adjust_link, 0,
PHY_INTERFACE_MODE_RGMII_ID);
}
if (!lp->phy_dev) { if (!lp->phy_dev) {
dev_err(lp->dev, "of_phy_connect() failed\n"); dev_err(lp->dev, "of_phy_connect() failed\n");
return -ENODEV; return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册