diff options
| author | Tom Rini <[email protected]> | 2025-03-11 19:05:03 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-03-11 19:05:03 -0600 |
| commit | 8540eba3e030fb1bcd4c6cd2d9b19f4f8ac1fb94 (patch) | |
| tree | 95ce9d9dfb69adc180d1742d0b88d032d4cf82ef /include | |
| parent | 38880f39e287af132f4fb28a3f64b2af10bdbf60 (diff) | |
| parent | 4226433858318be5914688963436ad41cbe2298d (diff) | |
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
Diffstat (limited to 'include')
| -rw-r--r-- | include/miiphy.h | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/include/miiphy.h b/include/miiphy.h index f2ff7506ee8..00d0b9b6a43 100644 --- a/include/miiphy.h +++ b/include/miiphy.h @@ -42,7 +42,6 @@ struct phy_device *mdio_phydev_for_ethname(const char *devname); void miiphy_listdev(void); -void mdio_init(struct mii_dev *bus); struct mii_dev *mdio_alloc(void); void mdio_free(struct mii_dev *bus); int mdio_register(struct mii_dev *bus); @@ -62,23 +61,19 @@ void mdio_list_devices(void); #define BB_MII_DEVNAME "bb_miiphy" -struct bb_miiphy_bus { - int (*mdio_active)(struct bb_miiphy_bus *bus); - int (*mdio_tristate)(struct bb_miiphy_bus *bus); - int (*set_mdio)(struct bb_miiphy_bus *bus, int v); - int (*get_mdio)(struct bb_miiphy_bus *bus, int *v); - int (*set_mdc)(struct bb_miiphy_bus *bus, int v); - int (*delay)(struct bb_miiphy_bus *bus); - void *priv; - struct mii_dev mii; +struct bb_miiphy_bus_ops { + int (*mdio_active)(struct mii_dev *miidev); + int (*mdio_tristate)(struct mii_dev *miidev); + int (*set_mdio)(struct mii_dev *miidev, int v); + int (*get_mdio)(struct mii_dev *miidev, int *v); + int (*set_mdc)(struct mii_dev *miidev, int v); + int (*delay)(struct mii_dev *miidev); }; -struct bb_miiphy_bus *bb_miiphy_alloc(void); -void bb_miiphy_free(struct bb_miiphy_bus *bus); - -int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg); -int bb_miiphy_write(struct mii_dev *miidev, int addr, int devad, int reg, - u16 value); +int bb_miiphy_read(struct mii_dev *miidev, const struct bb_miiphy_bus_ops *ops, + int addr, int devad, int reg); +int bb_miiphy_write(struct mii_dev *miidev, const struct bb_miiphy_bus_ops *ops, + int addr, int devad, int reg, u16 value); #endif /* phy seed setup */ |
