diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-05-24 08:32:09 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-23 09:24:06 +0200 |
commit | 9da83e7886d9374aca023717d9f87643ce87c2d5 (patch) | |
tree | e7ae9f4c956ed6b6c21d22d57ac41f495f3e229a /rtemsbsd/powerpc | |
parent | soc/qbman: Simplify bman_release() (diff) | |
download | rtems-libbsd-9da83e7886d9374aca023717d9f87643ce87c2d5.tar.bz2 |
dpaa: Support c45 phys
Diffstat (limited to 'rtemsbsd/powerpc')
-rw-r--r-- | rtemsbsd/powerpc/include/linux/phy.h | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/rtemsbsd/powerpc/include/linux/phy.h b/rtemsbsd/powerpc/include/linux/phy.h index 0c1991ce..f933f5fd 100644 --- a/rtemsbsd/powerpc/include/linux/phy.h +++ b/rtemsbsd/powerpc/include/linux/phy.h @@ -80,9 +80,11 @@ typedef enum { #define SUPPORTED_MII (1U << 8) #define SUPPORTED_Pause (1U << 9) +#define MII_ADDR_C45 (1 << 30) + struct mdio_bus { - int (*read)(struct mdio_bus *bus, int phy, int reg); - int (*write)(struct mdio_bus *bus, int phy, int reg, int val); + int (*read)(struct mdio_bus *bus, int addr, int reg); + int (*write)(struct mdio_bus *bus, int addr, int reg, int val); SLIST_ENTRY(mdio_bus) next; int node; }; @@ -91,27 +93,14 @@ struct phy_device { struct { struct device dev; int addr; + int is_c45; struct mdio_bus *bus; } mdio; }; -static inline int -phy_read(struct phy_device *phy_dev, int reg) -{ - struct mdio_bus *mdio_dev; - - mdio_dev = phy_dev->mdio.bus; - return ((*mdio_dev->read)(mdio_dev, phy_dev->mdio.addr, (int)reg)); -} +int phy_read(struct phy_device *phy_dev, int reg); -static inline int -phy_write(struct phy_device *phy_dev, int reg, int val) -{ - struct mdio_bus *mdio_dev; - - mdio_dev = phy_dev->mdio.bus; - return ((*mdio_dev->write)(mdio_dev, phy_dev->mdio.addr, reg, val)); -} +int phy_write(struct phy_device *phy_dev, int reg, int val); #ifdef __cplusplus } |