net: axienet: convert to phylink API

Convert this driver to use the phylink API rather than the legacy PHY
API. This allows for better support for SFP modules connected using a
1000BaseX or SGMII interface.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Robert Hancock
2019-06-06 16:28:24 -06:00
committed by David S. Miller
parent 28ef9ebdb6
commit f5203a3d9b
3 changed files with 192 additions and 101 deletions

View File

@@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/if_vlan.h>
#include <linux/phylink.h>
/* Packet size info */
#define XAE_HDR_SIZE 14 /* Size of Ethernet header */
@@ -420,6 +421,9 @@ struct axienet_local {
/* Connection to PHY device */
struct device_node *phy_node;
struct phylink *phylink;
struct phylink_config phylink_config;
/* Clock for AXI bus */
struct clk *clk;
@@ -439,7 +443,6 @@ struct axienet_local {
phy_interface_t phy_mode;
u32 options; /* Current options word */
u32 last_link;
u32 features;
/* Buffer descriptors */