diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-07 11:57:51 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-07 11:57:51 +0100 |
commit | c56fdbbc37cf676b42bbbf8d0efd0b78df4aed22 (patch) | |
tree | 6677350dc844c6fdb88c64401a1f965feb722557 /include | |
parent | 9d8c0841d2a893625c2eb5d7055cdf1615af5b8f (diff) | |
parent | 9bc898059000da9882f2f0561bfcff6d709e52ac (diff) | |
download | barebox-c56fdbbc37cf676b42bbbf8d0efd0b78df4aed22.tar.gz barebox-c56fdbbc37cf676b42bbbf8d0efd0b78df4aed22.tar.xz |
Merge branch 'for-next/miiphy'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 94f631b188..9994e1107d 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -85,6 +85,8 @@ struct mii_bus { /* PHY addresses to be ignored when probing */ u32 phy_mask; + + struct list_head list; }; #define to_mii_bus(d) container_of(d, struct mii_bus, dev) @@ -92,6 +94,13 @@ int mdiobus_register(struct mii_bus *bus); void mdiobus_unregister(struct mii_bus *bus); struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); +extern struct list_head mii_bus_list; + +int mdiobus_detect(struct device_d *dev); + +#define for_each_mii_bus(mii) \ + list_for_each_entry(mii, &mii_bus_list, list) + /** * mdiobus_read - Convenience function for reading a given MII mgmt register * @bus: the mii_bus struct @@ -161,6 +170,7 @@ struct phy_device { int autoneg; int force; + int registered; /* private data pointer */ /* For use by PHYs to maintain extra state */ @@ -243,6 +253,8 @@ struct phy_device *get_phy_device(struct mii_bus *bus, int addr); int phy_init(void); int phy_init_hw(struct phy_device *phydev); +int phy_register_device(struct phy_device* dev); + /** * phy_read - Convenience function for reading a given PHY register * @phydev: the phy_device struct |