diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2014-04-13 20:41:48 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2014-04-13 20:41:48 +0000 |
commit | e898710327770b79fb55e9da85f1ef0ee9c548de (patch) | |
tree | 625d5dfdc42a0c873003630ec452e18321265025 | |
parent | c222d6e2b56c675fb9537ca3fcdbd0b6a51058d4 (diff) | |
download | master-187ad058-e898710327770b79fb55e9da85f1ef0ee9c548de.tar.gz master-187ad058-e898710327770b79fb55e9da85f1ef0ee9c548de.tar.bz2 master-187ad058-e898710327770b79fb55e9da85f1ef0ee9c548de.zip |
ar71xx: add phy_mmd_{read,write} helpers
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40506 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch b/target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch new file mode 100644 index 0000000000..961a65b9e0 --- /dev/null +++ b/target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch @@ -0,0 +1,40 @@ +--- a/drivers/net/phy/phy.c ++++ b/drivers/net/phy/phy.c +@@ -1009,6 +1009,12 @@ static int phy_read_mmd_indirect(struct + return ret; + } + ++int phy_read_mmd(struct phy_device *phydev, int prtad, int devad, int addr) ++{ ++ return phy_read_mmd_indirect(phydev->bus, prtad, devad, phydev->addr); ++} ++EXPORT_SYMBOL(phy_read_mmd); ++ + /** + * phy_write_mmd_indirect - writes data to the MMD registers + * @bus: the target MII bus +@@ -1034,6 +1040,12 @@ static void phy_write_mmd_indirect(struc + bus->write(bus, addr, MII_MMD_DATA, data); + } + ++void phy_write_mmd(struct phy_device *phydev, int prtad, int devad, u16 data) ++{ ++ phy_write_mmd_indirect(phydev->bus, prtad, devad, phydev->addr, data); ++} ++EXPORT_SYMBOL(phy_write_mmd); ++ + /** + * phy_init_eee - init and check the EEE feature + * @phydev: target phy_device struct +--- a/include/linux/phy.h ++++ b/include/linux/phy.h +@@ -580,6 +580,9 @@ int phy_register_fixup_for_uid(u32 phy_u + int (*run)(struct phy_device *)); + int phy_scan_fixups(struct phy_device *phydev); + ++int phy_read_mmd(struct phy_device *phydev, int prtad, int devad, int addr); ++void phy_write_mmd(struct phy_device *phydev, int prtad, int devad, u16 data); ++ + int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable); + int phy_get_eee_err(struct phy_device *phydev); + int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data); |