hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/staging/octeon/ethernet-mdio.c
....@@ -13,15 +13,10 @@
1313 #include <generated/utsrelease.h>
1414 #include <net/dst.h>
1515
16
-#include <asm/octeon/octeon.h>
17
-
18
-#include "ethernet-defines.h"
1916 #include "octeon-ethernet.h"
17
+#include "ethernet-defines.h"
2018 #include "ethernet-mdio.h"
2119 #include "ethernet-util.h"
22
-
23
-#include <asm/octeon/cvmx-gmxx-defs.h>
24
-#include <asm/octeon/cvmx-smix-defs.h>
2520
2621 static void cvm_oct_get_drvinfo(struct net_device *dev,
2722 struct ethtool_drvinfo *info)
....@@ -70,7 +65,7 @@
7065 }
7166
7267 void cvm_oct_note_carrier(struct octeon_ethernet *priv,
73
- cvmx_helper_link_info_t li)
68
+ union cvmx_helper_link_info li)
7469 {
7570 if (li.s.link_up) {
7671 pr_notice_ratelimited("%s: %u Mbps %s duplex, port %d, queue %d\n",
....@@ -86,7 +81,7 @@
8681 void cvm_oct_adjust_link(struct net_device *dev)
8782 {
8883 struct octeon_ethernet *priv = netdev_priv(dev);
89
- cvmx_helper_link_info_t link_info;
84
+ union cvmx_helper_link_info link_info;
9085
9186 link_info.u64 = 0;
9287 link_info.s.link_up = dev->phydev->link ? 1 : 0;
....@@ -111,7 +106,7 @@
111106 {
112107 struct octeon_ethernet *priv = netdev_priv(dev);
113108 int interface = INTERFACE(priv->port);
114
- cvmx_helper_link_info_t link_info;
109
+ union cvmx_helper_link_info link_info;
115110 union cvmx_gmxx_prtx_cfg gmx_cfg;
116111 int index = INDEX(priv->port);
117112
....@@ -158,14 +153,14 @@
158153 goto no_phy;
159154
160155 phydev = of_phy_connect(dev, phy_node, cvm_oct_adjust_link, 0,
161
- PHY_INTERFACE_MODE_GMII);
156
+ priv->phy_mode);
162157 of_node_put(phy_node);
163158
164159 if (!phydev)
165
- return -ENODEV;
160
+ return -EPROBE_DEFER;
166161
167162 priv->last_link = 0;
168
- phy_start_aneg(phydev);
163
+ phy_start(phydev);
169164
170165 return 0;
171166 no_phy: