Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | * drivers/net/phy/smsc.c |
| 3 | * |
| 4 | * Driver for SMSC PHYs |
| 5 | * |
| 6 | * Author: Herbert Valerio Riedel |
| 7 | * |
| 8 | * Copyright (c) 2006 Herbert Valerio Riedel <hvr@gnu.org> |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify it |
| 11 | * under the terms of the GNU General Public License as published by the |
| 12 | * Free Software Foundation; either version 2 of the License, or (at your |
| 13 | * option) any later version. |
| 14 | * |
Steve Glendinning | 90b24cf | 2012-04-16 12:13:29 +0100 | [diff] [blame] | 15 | * Support added for SMSC LAN8187 and LAN8700 by steve.glendinning@shawell.net |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 16 | * |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 17 | */ |
| 18 | |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 19 | #include <linux/kernel.h> |
| 20 | #include <linux/module.h> |
| 21 | #include <linux/mii.h> |
| 22 | #include <linux/ethtool.h> |
Andrew Lunn | c6e970a | 2017-03-28 23:45:06 +0200 | [diff] [blame] | 23 | #include <linux/of.h> |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 24 | #include <linux/phy.h> |
| 25 | #include <linux/netdevice.h> |
Javier Martinez Canillas | 43c6759 | 2012-01-03 20:23:18 -0500 | [diff] [blame] | 26 | #include <linux/smscphy.h> |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 27 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 28 | struct smsc_phy_priv { |
| 29 | bool energy_enable; |
| 30 | }; |
| 31 | |
Steve Glendinning | 48c41b9 | 2008-04-28 18:36:46 +0100 | [diff] [blame] | 32 | static int smsc_phy_config_intr(struct phy_device *phydev) |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 33 | { |
| 34 | int rc = phy_write (phydev, MII_LAN83C185_IM, |
| 35 | ((PHY_INTERRUPT_ENABLED == phydev->interrupts) |
| 36 | ? MII_LAN83C185_ISF_INT_PHYLIB_EVENTS |
| 37 | : 0)); |
| 38 | |
| 39 | return rc < 0 ? rc : 0; |
| 40 | } |
| 41 | |
Steve Glendinning | 48c41b9 | 2008-04-28 18:36:46 +0100 | [diff] [blame] | 42 | static int smsc_phy_ack_interrupt(struct phy_device *phydev) |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 43 | { |
| 44 | int rc = phy_read (phydev, MII_LAN83C185_ISF); |
| 45 | |
| 46 | return rc < 0 ? rc : 0; |
| 47 | } |
| 48 | |
Steve Glendinning | 48c41b9 | 2008-04-28 18:36:46 +0100 | [diff] [blame] | 49 | static int smsc_phy_config_init(struct phy_device *phydev) |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 50 | { |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 51 | struct smsc_phy_priv *priv = phydev->priv; |
| 52 | |
Gwenhael Goavec-Merou | 2100968 | 2014-08-15 15:00:38 +0200 | [diff] [blame] | 53 | int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); |
| 54 | |
| 55 | if (rc < 0) |
| 56 | return rc; |
| 57 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 58 | if (priv->energy_enable) { |
Heiko Schocher | d88ecb3 | 2015-10-17 06:04:36 +0200 | [diff] [blame] | 59 | /* Enable energy detect mode for this SMSC Transceivers */ |
| 60 | rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, |
| 61 | rc | MII_LAN83C185_EDPWRDOWN); |
| 62 | if (rc < 0) |
| 63 | return rc; |
| 64 | } |
Gwenhael Goavec-Merou | 2100968 | 2014-08-15 15:00:38 +0200 | [diff] [blame] | 65 | |
| 66 | return smsc_phy_ack_interrupt(phydev); |
| 67 | } |
| 68 | |
| 69 | static int smsc_phy_reset(struct phy_device *phydev) |
| 70 | { |
trem | 6ded7cd | 2012-12-04 08:52:10 +0000 | [diff] [blame] | 71 | int rc = phy_read(phydev, MII_LAN83C185_SPECIAL_MODES); |
| 72 | if (rc < 0) |
| 73 | return rc; |
| 74 | |
| 75 | /* If the SMSC PHY is in power down mode, then set it |
| 76 | * in all capable mode before using it. |
| 77 | */ |
| 78 | if ((rc & MII_LAN83C185_MODE_MASK) == MII_LAN83C185_MODE_POWERDOWN) { |
Manfred Schlaegl | fc0f7e3 | 2016-06-06 10:47:47 +0200 | [diff] [blame] | 79 | /* set "all capable" mode */ |
trem | 6ded7cd | 2012-12-04 08:52:10 +0000 | [diff] [blame] | 80 | rc |= MII_LAN83C185_MODE_ALL; |
| 81 | phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc); |
trem | 6ded7cd | 2012-12-04 08:52:10 +0000 | [diff] [blame] | 82 | } |
Manfred Schlaegl | fc0f7e3 | 2016-06-06 10:47:47 +0200 | [diff] [blame] | 83 | |
| 84 | /* reset the phy */ |
| 85 | return genphy_soft_reset(phydev); |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 86 | } |
| 87 | |
Giuseppe Cavallaro | 698244a | 2010-01-06 20:35:14 -0800 | [diff] [blame] | 88 | static int lan911x_config_init(struct phy_device *phydev) |
| 89 | { |
| 90 | return smsc_phy_ack_interrupt(phydev); |
| 91 | } |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 92 | |
Patrick Trantham | 4223dbf | 2012-11-15 09:00:57 +0000 | [diff] [blame] | 93 | /* |
Igor Plyatov | 776829d | 2015-08-14 20:11:02 +0300 | [diff] [blame] | 94 | * The LAN87xx suffers from rare absence of the ENERGYON-bit when Ethernet cable |
| 95 | * plugs in while LAN87xx is in Energy Detect Power-Down mode. This leads to |
| 96 | * unstable detection of plugging in Ethernet cable. |
| 97 | * This workaround disables Energy Detect Power-Down mode and waiting for |
| 98 | * response on link pulses to detect presence of plugged Ethernet cable. |
| 99 | * The Energy Detect Power-Down mode is enabled again in the end of procedure to |
| 100 | * save approximately 220 mW of power if cable is unplugged. |
Patrick Trantham | 4223dbf | 2012-11-15 09:00:57 +0000 | [diff] [blame] | 101 | */ |
| 102 | static int lan87xx_read_status(struct phy_device *phydev) |
| 103 | { |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 104 | struct smsc_phy_priv *priv = phydev->priv; |
Patrick Trantham | 4223dbf | 2012-11-15 09:00:57 +0000 | [diff] [blame] | 105 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 106 | int err = genphy_read_status(phydev); |
| 107 | |
| 108 | if (!phydev->link && priv->energy_enable) { |
| 109 | int i; |
| 110 | |
Patrick Trantham | 4223dbf | 2012-11-15 09:00:57 +0000 | [diff] [blame] | 111 | /* Disable EDPD to wake up PHY */ |
| 112 | int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); |
| 113 | if (rc < 0) |
| 114 | return rc; |
| 115 | |
| 116 | rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, |
| 117 | rc & ~MII_LAN83C185_EDPWRDOWN); |
| 118 | if (rc < 0) |
| 119 | return rc; |
| 120 | |
Igor Plyatov | 776829d | 2015-08-14 20:11:02 +0300 | [diff] [blame] | 121 | /* Wait max 640 ms to detect energy */ |
| 122 | for (i = 0; i < 64; i++) { |
| 123 | /* Sleep to allow link test pulses to be sent */ |
| 124 | msleep(10); |
| 125 | rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); |
| 126 | if (rc < 0) |
| 127 | return rc; |
| 128 | if (rc & MII_LAN83C185_ENERGYON) |
| 129 | break; |
kbuild test robot | ff94c74 | 2015-08-18 06:31:42 +0800 | [diff] [blame] | 130 | } |
Patrick Trantham | 4223dbf | 2012-11-15 09:00:57 +0000 | [diff] [blame] | 131 | |
| 132 | /* Re-enable EDPD */ |
| 133 | rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); |
| 134 | if (rc < 0) |
| 135 | return rc; |
| 136 | |
| 137 | rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, |
| 138 | rc | MII_LAN83C185_EDPWRDOWN); |
| 139 | if (rc < 0) |
| 140 | return rc; |
| 141 | } |
| 142 | |
| 143 | return err; |
| 144 | } |
| 145 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 146 | static int smsc_phy_probe(struct phy_device *phydev) |
| 147 | { |
| 148 | struct device *dev = &phydev->mdio.dev; |
| 149 | struct device_node *of_node = dev->of_node; |
| 150 | struct smsc_phy_priv *priv; |
| 151 | |
| 152 | priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); |
| 153 | if (!priv) |
| 154 | return -ENOMEM; |
| 155 | |
| 156 | priv->energy_enable = true; |
| 157 | |
| 158 | if (of_property_read_bool(of_node, "smsc,disable-energy-detect")) |
| 159 | priv->energy_enable = false; |
| 160 | |
| 161 | phydev->priv = priv; |
| 162 | |
| 163 | return 0; |
| 164 | } |
| 165 | |
Christian Hohnstaedt | d5bf907 | 2012-07-04 05:44:34 +0000 | [diff] [blame] | 166 | static struct phy_driver smsc_phy_driver[] = { |
| 167 | { |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 168 | .phy_id = 0x0007c0a0, /* OUI=0x00800f, Model#=0x0a */ |
| 169 | .phy_id_mask = 0xfffffff0, |
| 170 | .name = "SMSC LAN83C185", |
| 171 | |
Timur Tabi | 529ed12 | 2016-12-07 13:20:51 -0600 | [diff] [blame] | 172 | .features = PHY_BASIC_FEATURES, |
Andrew Lunn | 1b86f70 | 2017-05-16 18:29:11 +0200 | [diff] [blame] | 173 | .flags = PHY_HAS_INTERRUPT, |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 174 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 175 | .probe = smsc_phy_probe, |
| 176 | |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 177 | /* basic functions */ |
| 178 | .config_aneg = genphy_config_aneg, |
| 179 | .read_status = genphy_read_status, |
Steve Glendinning | 48c41b9 | 2008-04-28 18:36:46 +0100 | [diff] [blame] | 180 | .config_init = smsc_phy_config_init, |
Gwenhael Goavec-Merou | 2100968 | 2014-08-15 15:00:38 +0200 | [diff] [blame] | 181 | .soft_reset = smsc_phy_reset, |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 182 | |
| 183 | /* IRQ related */ |
Steve Glendinning | 48c41b9 | 2008-04-28 18:36:46 +0100 | [diff] [blame] | 184 | .ack_interrupt = smsc_phy_ack_interrupt, |
| 185 | .config_intr = smsc_phy_config_intr, |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 186 | |
Steve Glendinning | c64d2a9 | 2009-01-22 14:07:43 -0800 | [diff] [blame] | 187 | .suspend = genphy_suspend, |
| 188 | .resume = genphy_resume, |
Christian Hohnstaedt | d5bf907 | 2012-07-04 05:44:34 +0000 | [diff] [blame] | 189 | }, { |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 190 | .phy_id = 0x0007c0b0, /* OUI=0x00800f, Model#=0x0b */ |
| 191 | .phy_id_mask = 0xfffffff0, |
| 192 | .name = "SMSC LAN8187", |
| 193 | |
Timur Tabi | 529ed12 | 2016-12-07 13:20:51 -0600 | [diff] [blame] | 194 | .features = PHY_BASIC_FEATURES, |
Andrew Lunn | 1b86f70 | 2017-05-16 18:29:11 +0200 | [diff] [blame] | 195 | .flags = PHY_HAS_INTERRUPT, |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 196 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 197 | .probe = smsc_phy_probe, |
| 198 | |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 199 | /* basic functions */ |
| 200 | .config_aneg = genphy_config_aneg, |
| 201 | .read_status = genphy_read_status, |
| 202 | .config_init = smsc_phy_config_init, |
Gwenhael Goavec-Merou | 2100968 | 2014-08-15 15:00:38 +0200 | [diff] [blame] | 203 | .soft_reset = smsc_phy_reset, |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 204 | |
| 205 | /* IRQ related */ |
| 206 | .ack_interrupt = smsc_phy_ack_interrupt, |
| 207 | .config_intr = smsc_phy_config_intr, |
| 208 | |
Steve Glendinning | c64d2a9 | 2009-01-22 14:07:43 -0800 | [diff] [blame] | 209 | .suspend = genphy_suspend, |
| 210 | .resume = genphy_resume, |
Christian Hohnstaedt | d5bf907 | 2012-07-04 05:44:34 +0000 | [diff] [blame] | 211 | }, { |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 212 | .phy_id = 0x0007c0c0, /* OUI=0x00800f, Model#=0x0c */ |
| 213 | .phy_id_mask = 0xfffffff0, |
| 214 | .name = "SMSC LAN8700", |
| 215 | |
Timur Tabi | 529ed12 | 2016-12-07 13:20:51 -0600 | [diff] [blame] | 216 | .features = PHY_BASIC_FEATURES, |
Andrew Lunn | 1b86f70 | 2017-05-16 18:29:11 +0200 | [diff] [blame] | 217 | .flags = PHY_HAS_INTERRUPT, |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 218 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 219 | .probe = smsc_phy_probe, |
| 220 | |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 221 | /* basic functions */ |
| 222 | .config_aneg = genphy_config_aneg, |
Igor Plyatov | 776829d | 2015-08-14 20:11:02 +0300 | [diff] [blame] | 223 | .read_status = lan87xx_read_status, |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 224 | .config_init = smsc_phy_config_init, |
Gwenhael Goavec-Merou | 2100968 | 2014-08-15 15:00:38 +0200 | [diff] [blame] | 225 | .soft_reset = smsc_phy_reset, |
Steve Glendinning | 4d9b1a0 | 2008-04-28 18:37:29 +0100 | [diff] [blame] | 226 | |
| 227 | /* IRQ related */ |
| 228 | .ack_interrupt = smsc_phy_ack_interrupt, |
| 229 | .config_intr = smsc_phy_config_intr, |
| 230 | |
Steve Glendinning | c64d2a9 | 2009-01-22 14:07:43 -0800 | [diff] [blame] | 231 | .suspend = genphy_suspend, |
| 232 | .resume = genphy_resume, |
Christian Hohnstaedt | d5bf907 | 2012-07-04 05:44:34 +0000 | [diff] [blame] | 233 | }, { |
Steve Glendinning | fd9abb3 | 2008-11-05 00:35:37 +0000 | [diff] [blame] | 234 | .phy_id = 0x0007c0d0, /* OUI=0x00800f, Model#=0x0d */ |
| 235 | .phy_id_mask = 0xfffffff0, |
| 236 | .name = "SMSC LAN911x Internal PHY", |
| 237 | |
Timur Tabi | 529ed12 | 2016-12-07 13:20:51 -0600 | [diff] [blame] | 238 | .features = PHY_BASIC_FEATURES, |
Andrew Lunn | 1b86f70 | 2017-05-16 18:29:11 +0200 | [diff] [blame] | 239 | .flags = PHY_HAS_INTERRUPT, |
Steve Glendinning | fd9abb3 | 2008-11-05 00:35:37 +0000 | [diff] [blame] | 240 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 241 | .probe = smsc_phy_probe, |
| 242 | |
Steve Glendinning | fd9abb3 | 2008-11-05 00:35:37 +0000 | [diff] [blame] | 243 | /* basic functions */ |
| 244 | .config_aneg = genphy_config_aneg, |
| 245 | .read_status = genphy_read_status, |
Giuseppe Cavallaro | 698244a | 2010-01-06 20:35:14 -0800 | [diff] [blame] | 246 | .config_init = lan911x_config_init, |
Steve Glendinning | fd9abb3 | 2008-11-05 00:35:37 +0000 | [diff] [blame] | 247 | |
| 248 | /* IRQ related */ |
| 249 | .ack_interrupt = smsc_phy_ack_interrupt, |
| 250 | .config_intr = smsc_phy_config_intr, |
| 251 | |
Steve Glendinning | c64d2a9 | 2009-01-22 14:07:43 -0800 | [diff] [blame] | 252 | .suspend = genphy_suspend, |
| 253 | .resume = genphy_resume, |
Christian Hohnstaedt | d5bf907 | 2012-07-04 05:44:34 +0000 | [diff] [blame] | 254 | }, { |
Steve Glendinning | e072b63 | 2009-03-23 15:17:31 -0700 | [diff] [blame] | 255 | .phy_id = 0x0007c0f0, /* OUI=0x00800f, Model#=0x0f */ |
| 256 | .phy_id_mask = 0xfffffff0, |
| 257 | .name = "SMSC LAN8710/LAN8720", |
| 258 | |
Timur Tabi | 529ed12 | 2016-12-07 13:20:51 -0600 | [diff] [blame] | 259 | .features = PHY_BASIC_FEATURES, |
Andrew Lunn | 1b86f70 | 2017-05-16 18:29:11 +0200 | [diff] [blame] | 260 | .flags = PHY_HAS_INTERRUPT, |
Steve Glendinning | e072b63 | 2009-03-23 15:17:31 -0700 | [diff] [blame] | 261 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 262 | .probe = smsc_phy_probe, |
| 263 | |
Steve Glendinning | e072b63 | 2009-03-23 15:17:31 -0700 | [diff] [blame] | 264 | /* basic functions */ |
| 265 | .config_aneg = genphy_config_aneg, |
Patrick Trantham | 4223dbf | 2012-11-15 09:00:57 +0000 | [diff] [blame] | 266 | .read_status = lan87xx_read_status, |
Patrick Trantham | 4257d58 | 2012-12-06 15:16:02 +0000 | [diff] [blame] | 267 | .config_init = smsc_phy_config_init, |
Gwenhael Goavec-Merou | 2100968 | 2014-08-15 15:00:38 +0200 | [diff] [blame] | 268 | .soft_reset = smsc_phy_reset, |
Steve Glendinning | e072b63 | 2009-03-23 15:17:31 -0700 | [diff] [blame] | 269 | |
| 270 | /* IRQ related */ |
| 271 | .ack_interrupt = smsc_phy_ack_interrupt, |
| 272 | .config_intr = smsc_phy_config_intr, |
| 273 | |
| 274 | .suspend = genphy_suspend, |
| 275 | .resume = genphy_resume, |
Joshua Henderson | 26706d4 | 2016-01-09 04:54:21 -0700 | [diff] [blame] | 276 | }, { |
| 277 | .phy_id = 0x0007c110, |
| 278 | .phy_id_mask = 0xfffffff0, |
| 279 | .name = "SMSC LAN8740", |
| 280 | |
Timur Tabi | 529ed12 | 2016-12-07 13:20:51 -0600 | [diff] [blame] | 281 | .features = PHY_BASIC_FEATURES, |
Andrew Lunn | 1b86f70 | 2017-05-16 18:29:11 +0200 | [diff] [blame] | 282 | .flags = PHY_HAS_INTERRUPT, |
Joshua Henderson | 26706d4 | 2016-01-09 04:54:21 -0700 | [diff] [blame] | 283 | |
Teresa Remmet | 0a9c453 | 2016-01-20 13:40:35 +0100 | [diff] [blame] | 284 | .probe = smsc_phy_probe, |
| 285 | |
Joshua Henderson | 26706d4 | 2016-01-09 04:54:21 -0700 | [diff] [blame] | 286 | /* basic functions */ |
| 287 | .config_aneg = genphy_config_aneg, |
| 288 | .read_status = lan87xx_read_status, |
| 289 | .config_init = smsc_phy_config_init, |
| 290 | .soft_reset = smsc_phy_reset, |
| 291 | |
| 292 | /* IRQ related */ |
| 293 | .ack_interrupt = smsc_phy_ack_interrupt, |
| 294 | .config_intr = smsc_phy_config_intr, |
| 295 | |
| 296 | .suspend = genphy_suspend, |
| 297 | .resume = genphy_resume, |
Christian Hohnstaedt | d5bf907 | 2012-07-04 05:44:34 +0000 | [diff] [blame] | 298 | } }; |
Steve Glendinning | e072b63 | 2009-03-23 15:17:31 -0700 | [diff] [blame] | 299 | |
Johan Hovold | 50fd715 | 2014-11-11 19:45:59 +0100 | [diff] [blame] | 300 | module_phy_driver(smsc_phy_driver); |
Herbert Valerio Riedel | c9e055a | 2006-05-07 23:22:53 +0200 | [diff] [blame] | 301 | |
| 302 | MODULE_DESCRIPTION("SMSC PHY driver"); |
| 303 | MODULE_AUTHOR("Herbert Valerio Riedel"); |
| 304 | MODULE_LICENSE("GPL"); |
| 305 | |
Uwe Kleine-König | cf93c94 | 2010-10-03 23:43:32 +0000 | [diff] [blame] | 306 | static struct mdio_device_id __maybe_unused smsc_tbl[] = { |
David Woodhouse | 4e4f10f | 2010-04-02 01:05:56 +0000 | [diff] [blame] | 307 | { 0x0007c0a0, 0xfffffff0 }, |
| 308 | { 0x0007c0b0, 0xfffffff0 }, |
| 309 | { 0x0007c0c0, 0xfffffff0 }, |
| 310 | { 0x0007c0d0, 0xfffffff0 }, |
| 311 | { 0x0007c0f0, 0xfffffff0 }, |
Joshua Henderson | 26706d4 | 2016-01-09 04:54:21 -0700 | [diff] [blame] | 312 | { 0x0007c110, 0xfffffff0 }, |
David Woodhouse | 4e4f10f | 2010-04-02 01:05:56 +0000 | [diff] [blame] | 313 | { } |
| 314 | }; |
| 315 | |
| 316 | MODULE_DEVICE_TABLE(mdio, smsc_tbl); |