diff options
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 14d7fdf6a90a..987e111f7b11 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mii.h> | 24 | #include <linux/mii.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/mod_devicetable.h> | ||
27 | 28 | ||
28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
29 | 30 | ||
@@ -81,6 +82,10 @@ typedef enum { | |||
81 | */ | 82 | */ |
82 | #define MII_BUS_ID_SIZE (20 - 3) | 83 | #define MII_BUS_ID_SIZE (20 - 3) |
83 | 84 | ||
85 | /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit | ||
86 | IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ | ||
87 | #define MII_ADDR_C45 (1<<30) | ||
88 | |||
84 | /* | 89 | /* |
85 | * The Bus class for PHYs. Devices which provide access to | 90 | * The Bus class for PHYs. Devices which provide access to |
86 | * PHYs should register using this structure | 91 | * PHYs should register using this structure |
@@ -127,8 +132,8 @@ int mdiobus_register(struct mii_bus *bus); | |||
127 | void mdiobus_unregister(struct mii_bus *bus); | 132 | void mdiobus_unregister(struct mii_bus *bus); |
128 | void mdiobus_free(struct mii_bus *bus); | 133 | void mdiobus_free(struct mii_bus *bus); |
129 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); | 134 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); |
130 | int mdiobus_read(struct mii_bus *bus, int addr, u16 regnum); | 135 | int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); |
131 | int mdiobus_write(struct mii_bus *bus, int addr, u16 regnum, u16 val); | 136 | int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); |
132 | 137 | ||
133 | 138 | ||
134 | #define PHY_INTERRUPT_DISABLED 0x0 | 139 | #define PHY_INTERRUPT_DISABLED 0x0 |
@@ -422,7 +427,7 @@ struct phy_fixup { | |||
422 | * because the bus read/write functions may wait for an interrupt | 427 | * because the bus read/write functions may wait for an interrupt |
423 | * to conclude the operation. | 428 | * to conclude the operation. |
424 | */ | 429 | */ |
425 | static inline int phy_read(struct phy_device *phydev, u16 regnum) | 430 | static inline int phy_read(struct phy_device *phydev, u32 regnum) |
426 | { | 431 | { |
427 | return mdiobus_read(phydev->bus, phydev->addr, regnum); | 432 | return mdiobus_read(phydev->bus, phydev->addr, regnum); |
428 | } | 433 | } |
@@ -437,7 +442,7 @@ static inline int phy_read(struct phy_device *phydev, u16 regnum) | |||
437 | * because the bus read/write functions may wait for an interrupt | 442 | * because the bus read/write functions may wait for an interrupt |
438 | * to conclude the operation. | 443 | * to conclude the operation. |
439 | */ | 444 | */ |
440 | static inline int phy_write(struct phy_device *phydev, u16 regnum, u16 val) | 445 | static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) |
441 | { | 446 | { |
442 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | 447 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); |
443 | } | 448 | } |