aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2018-03-01 19:08:58 -0500
committerDavid S. Miller <davem@davemloft.net>2018-03-01 21:23:35 -0500
commit0adfdb667ab5a4c05765d0f3272afee82b2abf93 (patch)
tree8ca4ee46572afb6bd15899e318c95c5a5612b744
parentaebc78a40b8862e27f374fc7016cd9b4654488ed (diff)
net: phy: cortina: Utilize generic functions
cortina_soft_reset() does the same thing as gen10g_soft_reset(), and cortina_config_aneg() is actually doing what gen10g_config_init() does for 10G capable PHYs. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r--drivers/net/phy/cortina.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index 9442db221834..8022cd317f62 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -30,14 +30,6 @@ static int cortina_read_reg(struct phy_device *phydev, u16 regnum)
30 MII_ADDR_C45 | regnum); 30 MII_ADDR_C45 | regnum);
31} 31}
32 32
33static int cortina_config_aneg(struct phy_device *phydev)
34{
35 phydev->supported = SUPPORTED_10000baseT_Full;
36 phydev->advertising = SUPPORTED_10000baseT_Full;
37
38 return 0;
39}
40
41static int cortina_read_status(struct phy_device *phydev) 33static int cortina_read_status(struct phy_device *phydev)
42{ 34{
43 int gpio_int_status, ret = 0; 35 int gpio_int_status, ret = 0;
@@ -61,11 +53,6 @@ err:
61 return ret; 53 return ret;
62} 54}
63 55
64static int cortina_soft_reset(struct phy_device *phydev)
65{
66 return 0;
67}
68
69static int cortina_probe(struct phy_device *phydev) 56static int cortina_probe(struct phy_device *phydev)
70{ 57{
71 u32 phy_id = 0; 58 u32 phy_id = 0;
@@ -101,9 +88,10 @@ static struct phy_driver cortina_driver[] = {
101 .phy_id = PHY_ID_CS4340, 88 .phy_id = PHY_ID_CS4340,
102 .phy_id_mask = 0xffffffff, 89 .phy_id_mask = 0xffffffff,
103 .name = "Cortina CS4340", 90 .name = "Cortina CS4340",
104 .config_aneg = cortina_config_aneg, 91 .config_init = gen10g_config_init,
92 .config_aneg = gen10g_config_aneg,
105 .read_status = cortina_read_status, 93 .read_status = cortina_read_status,
106 .soft_reset = cortina_soft_reset, 94 .soft_reset = gen10g_no_soft_reset,
107 .probe = cortina_probe, 95 .probe = cortina_probe,
108}, 96},
109}; 97};