diff options
| author | shaohui xie <Shaohui.Xie@freescale.com> | 2013-11-20 17:38:17 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-11-20 22:09:01 -0500 |
| commit | c2efef747d90c412d65752b3698bf8a9e98ddb8a (patch) | |
| tree | 78923e88a17922d1e585566d434c6e9488f4ee3c | |
| parent | 0508019cca6c425a9db79b2b3aa37afba0a5542b (diff) | |
net/phy: Add VSC8574 support
The VSC8574 is a quad-port Gigabit Ethernet transceiver with four SerDes
interfaces for quad-port dual media capability.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Andy Fleming <afleming@gmail.com>
Signed-off-by: Shruti Kanetkar <Shruti@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/phy/vitesse.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 59e3b58a3723..31b31488b416 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c | |||
| @@ -56,6 +56,7 @@ | |||
| 56 | 56 | ||
| 57 | #define PHY_ID_VSC8234 0x000fc620 | 57 | #define PHY_ID_VSC8234 0x000fc620 |
| 58 | #define PHY_ID_VSC8244 0x000fc6c0 | 58 | #define PHY_ID_VSC8244 0x000fc6c0 |
| 59 | #define PHY_ID_VSC8574 0x000704a0 | ||
| 59 | #define PHY_ID_VSC8221 0x000fc550 | 60 | #define PHY_ID_VSC8221 0x000fc550 |
| 60 | #define PHY_ID_VSC8211 0x000fc4b0 | 61 | #define PHY_ID_VSC8211 0x000fc4b0 |
| 61 | 62 | ||
| @@ -120,7 +121,8 @@ static int vsc82xx_config_intr(struct phy_device *phydev) | |||
| 120 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) | 121 | if (phydev->interrupts == PHY_INTERRUPT_ENABLED) |
| 121 | err = phy_write(phydev, MII_VSC8244_IMASK, | 122 | err = phy_write(phydev, MII_VSC8244_IMASK, |
| 122 | (phydev->drv->phy_id == PHY_ID_VSC8234 || | 123 | (phydev->drv->phy_id == PHY_ID_VSC8234 || |
| 123 | phydev->drv->phy_id == PHY_ID_VSC8244) ? | 124 | phydev->drv->phy_id == PHY_ID_VSC8244 || |
| 125 | phydev->drv->phy_id == PHY_ID_VSC8574) ? | ||
| 124 | MII_VSC8244_IMASK_MASK : | 126 | MII_VSC8244_IMASK_MASK : |
| 125 | MII_VSC8221_IMASK_MASK); | 127 | MII_VSC8221_IMASK_MASK); |
| 126 | else { | 128 | else { |
| @@ -178,6 +180,18 @@ static struct phy_driver vsc82xx_driver[] = { | |||
| 178 | .config_intr = &vsc82xx_config_intr, | 180 | .config_intr = &vsc82xx_config_intr, |
| 179 | .driver = { .owner = THIS_MODULE,}, | 181 | .driver = { .owner = THIS_MODULE,}, |
| 180 | }, { | 182 | }, { |
| 183 | .phy_id = PHY_ID_VSC8574, | ||
| 184 | .name = "Vitesse VSC8574", | ||
| 185 | .phy_id_mask = 0x000ffff0, | ||
| 186 | .features = PHY_GBIT_FEATURES, | ||
| 187 | .flags = PHY_HAS_INTERRUPT, | ||
| 188 | .config_init = &vsc824x_config_init, | ||
| 189 | .config_aneg = &genphy_config_aneg, | ||
| 190 | .read_status = &genphy_read_status, | ||
| 191 | .ack_interrupt = &vsc824x_ack_interrupt, | ||
| 192 | .config_intr = &vsc82xx_config_intr, | ||
| 193 | .driver = { .owner = THIS_MODULE,}, | ||
| 194 | }, { | ||
| 181 | /* Vitesse 8221 */ | 195 | /* Vitesse 8221 */ |
| 182 | .phy_id = PHY_ID_VSC8221, | 196 | .phy_id = PHY_ID_VSC8221, |
| 183 | .phy_id_mask = 0x000ffff0, | 197 | .phy_id_mask = 0x000ffff0, |
| @@ -223,6 +237,7 @@ module_exit(vsc82xx_exit); | |||
| 223 | static struct mdio_device_id __maybe_unused vitesse_tbl[] = { | 237 | static struct mdio_device_id __maybe_unused vitesse_tbl[] = { |
| 224 | { PHY_ID_VSC8234, 0x000ffff0 }, | 238 | { PHY_ID_VSC8234, 0x000ffff0 }, |
| 225 | { PHY_ID_VSC8244, 0x000fffc0 }, | 239 | { PHY_ID_VSC8244, 0x000fffc0 }, |
| 240 | { PHY_ID_VSC8574, 0x000ffff0 }, | ||
| 226 | { PHY_ID_VSC8221, 0x000ffff0 }, | 241 | { PHY_ID_VSC8221, 0x000ffff0 }, |
| 227 | { PHY_ID_VSC8211, 0x000ffff0 }, | 242 | { PHY_ID_VSC8211, 0x000ffff0 }, |
| 228 | { } | 243 | { } |
