diff options
Diffstat (limited to 'target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch | 57 |
1 files changed, 17 insertions, 40 deletions
diff --git a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch index 0e8e3695f3..312faf2c5b 100644 --- a/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch +++ b/target/linux/layerscape/patches-4.9/703-phy-support-layerscape.patch @@ -26,8 +26,6 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> create mode 100644 drivers/net/phy/cortina.c create mode 100644 drivers/net/phy/fsl_backplane.c -diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig -index 30a3a2f5..3521c1ac 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -89,6 +89,12 @@ config MDIO_BUS_MUX_MMIOREG @@ -55,11 +53,9 @@ index 30a3a2f5..3521c1ac 100644 config DAVICOM_PHY tristate "Davicom PHYs" ---help--- -diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile -index 93a68fcd..ef3ec265 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile -@@ -30,6 +30,7 @@ obj-$(CONFIG_MDIO_BUS_MUX_BCM_IPROC) += mdio-mux-bcm-iproc.o +@@ -30,6 +30,7 @@ obj-$(CONFIG_MDIO_BUS_MUX_BCM_IPROC) += obj-$(CONFIG_MDIO_BUS_MUX_GPIO) += mdio-mux-gpio.o obj-$(CONFIG_MDIO_BUS_MUX_MMIOREG) += mdio-mux-mmioreg.o obj-$(CONFIG_MDIO_CAVIUM) += mdio-cavium.o @@ -67,7 +63,7 @@ index 93a68fcd..ef3ec265 100644 obj-$(CONFIG_MDIO_GPIO) += mdio-gpio.o obj-$(CONFIG_MDIO_HISI_FEMAC) += mdio-hisi-femac.o obj-$(CONFIG_MDIO_MOXART) += mdio-moxart.o -@@ -48,6 +49,7 @@ obj-$(CONFIG_BCM_CYGNUS_PHY) += bcm-cygnus.o +@@ -48,6 +49,7 @@ obj-$(CONFIG_BCM_CYGNUS_PHY) += bcm-cygn obj-$(CONFIG_BCM_NET_PHYLIB) += bcm-phy-lib.o obj-$(CONFIG_BROADCOM_PHY) += broadcom.o obj-$(CONFIG_CICADA_PHY) += cicada.o @@ -75,8 +71,6 @@ index 93a68fcd..ef3ec265 100644 obj-$(CONFIG_DAVICOM_PHY) += davicom.o obj-$(CONFIG_DP83640_PHY) += dp83640.o obj-$(CONFIG_DP83848_PHY) += dp83848.o -diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c -index 09b0b0aa..e8ae50e1 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -21,6 +21,8 @@ @@ -88,11 +82,10 @@ index 09b0b0aa..e8ae50e1 100644 #define PHY_ID_AQR405 0x03a1b4b0 #define PHY_AQUANTIA_FEATURES (SUPPORTED_10000baseT_Full | \ -@@ -153,6 +155,30 @@ static struct phy_driver aquantia_driver[] = { - .ack_interrupt = aquantia_ack_interrupt, +@@ -154,6 +156,30 @@ static struct phy_driver aquantia_driver .read_status = aquantia_read_status, }, -+{ + { + .phy_id = PHY_ID_AQR106, + .phy_id_mask = 0xfffffff0, + .name = "Aquantia AQR106", @@ -116,10 +109,11 @@ index 09b0b0aa..e8ae50e1 100644 + .ack_interrupt = aquantia_ack_interrupt, + .read_status = aquantia_read_status, +}, - { ++{ .phy_id = PHY_ID_AQR405, .phy_id_mask = 0xfffffff0, -@@ -173,6 +199,8 @@ static struct mdio_device_id __maybe_unused aquantia_tbl[] = { + .name = "Aquantia AQR405", +@@ -173,6 +199,8 @@ static struct mdio_device_id __maybe_unu { PHY_ID_AQ1202, 0xfffffff0 }, { PHY_ID_AQ2104, 0xfffffff0 }, { PHY_ID_AQR105, 0xfffffff0 }, @@ -128,9 +122,6 @@ index 09b0b0aa..e8ae50e1 100644 { PHY_ID_AQR405, 0xfffffff0 }, { } }; -diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c -new file mode 100644 -index 00000000..72f4228a --- /dev/null +++ b/drivers/net/phy/cortina.c @@ -0,0 +1,118 @@ @@ -252,9 +243,6 @@ index 00000000..72f4228a +}; + +MODULE_DEVICE_TABLE(mdio, cortina_tbl); -diff --git a/drivers/net/phy/fsl_backplane.c b/drivers/net/phy/fsl_backplane.c -new file mode 100644 -index 00000000..76865261 --- /dev/null +++ b/drivers/net/phy/fsl_backplane.c @@ -0,0 +1,1358 @@ @@ -1616,11 +1604,9 @@ index 00000000..76865261 +MODULE_DESCRIPTION("Freescale Backplane driver"); +MODULE_AUTHOR("Shaohui Xie <Shaohui.Xie@freescale.com>"); +MODULE_LICENSE("GPL v2"); -diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c -index f3e64a89..42cdd5b7 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -585,7 +585,7 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd) +@@ -585,7 +585,7 @@ int phy_mii_ioctl(struct phy_device *phy return 0; case SIOCSHWTSTAMP: @@ -1629,7 +1615,7 @@ index f3e64a89..42cdd5b7 100644 return phydev->drv->hwtstamp(phydev, ifr); /* fall through */ -@@ -610,6 +610,9 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync) +@@ -610,6 +610,9 @@ static int phy_start_aneg_priv(struct ph bool trigger = 0; int err; @@ -1639,7 +1625,7 @@ index f3e64a89..42cdd5b7 100644 mutex_lock(&phydev->lock); if (AUTONEG_DISABLE == phydev->autoneg) -@@ -1009,7 +1012,7 @@ void phy_state_machine(struct work_struct *work) +@@ -1009,7 +1012,7 @@ void phy_state_machine(struct work_struc old_state = phydev->state; @@ -1668,7 +1654,7 @@ index f3e64a89..42cdd5b7 100644 return phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_WK_ERR, MDIO_MMD_PCS); } EXPORT_SYMBOL(phy_get_eee_err); -@@ -1404,6 +1413,9 @@ int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data) +@@ -1404,6 +1413,9 @@ int phy_ethtool_get_eee(struct phy_devic { int val; @@ -1678,7 +1664,7 @@ index f3e64a89..42cdd5b7 100644 /* Get Supported EEE */ val = phy_read_mmd_indirect(phydev, MDIO_PCS_EEE_ABLE, MDIO_MMD_PCS); if (val < 0) -@@ -1437,6 +1449,9 @@ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) +@@ -1437,6 +1449,9 @@ int phy_ethtool_set_eee(struct phy_devic { int val = ethtool_adv_to_mmd_eee_adv_t(data->advertised); @@ -1706,11 +1692,9 @@ index f3e64a89..42cdd5b7 100644 phydev->drv->get_wol(phydev, wol); } EXPORT_SYMBOL(phy_ethtool_get_wol); -diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c -index 5fdc491e..039f9664 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1046,7 +1046,7 @@ int phy_suspend(struct phy_device *phydev) +@@ -1046,7 +1046,7 @@ int phy_suspend(struct phy_device *phyde if (wol.wolopts) return -EBUSY; @@ -1719,7 +1703,7 @@ index 5fdc491e..039f9664 100644 ret = phydrv->suspend(phydev); if (ret) -@@ -1063,7 +1063,7 @@ int phy_resume(struct phy_device *phydev) +@@ -1063,7 +1063,7 @@ int phy_resume(struct phy_device *phydev struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver); int ret = 0; @@ -1728,7 +1712,7 @@ index 5fdc491e..039f9664 100644 ret = phydrv->resume(phydev); if (ret) -@@ -1726,7 +1726,7 @@ static int phy_remove(struct device *dev) +@@ -1726,7 +1726,7 @@ static int phy_remove(struct device *dev phydev->state = PHY_DOWN; mutex_unlock(&phydev->lock); @@ -1737,11 +1721,9 @@ index 5fdc491e..039f9664 100644 phydev->drv->remove(phydev); phydev->drv = NULL; -diff --git a/drivers/net/phy/swphy.c b/drivers/net/phy/swphy.c -index 34f58f23..52ddddbe 100644 --- a/drivers/net/phy/swphy.c +++ b/drivers/net/phy/swphy.c -@@ -77,6 +77,7 @@ static const struct swmii_regs duplex[] = { +@@ -77,6 +77,7 @@ static const struct swmii_regs duplex[] static int swphy_decode_speed(int speed) { switch (speed) { @@ -1749,8 +1731,6 @@ index 34f58f23..52ddddbe 100644 case 1000: return SWMII_SPEED_1000; case 100: -diff --git a/include/linux/phy.h b/include/linux/phy.h -index 850c8b51..5f253f1a 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -81,6 +81,7 @@ typedef enum { @@ -1761,7 +1741,7 @@ index 850c8b51..5f253f1a 100644 PHY_INTERFACE_MODE_MAX, } phy_interface_t; -@@ -784,6 +785,9 @@ int phy_stop_interrupts(struct phy_device *phydev); +@@ -784,6 +785,9 @@ int phy_stop_interrupts(struct phy_devic static inline int phy_read_status(struct phy_device *phydev) { @@ -1771,6 +1751,3 @@ index 850c8b51..5f253f1a 100644 return phydev->drv->read_status(phydev); } --- -2.14.1 - |