summaryrefslogtreecommitdiff
path: root/include/miiphy.h
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-02-26 14:32:16 -0600
committerTom Rini <[email protected]>2025-02-26 14:32:16 -0600
commit05647bdf55f94decea8f2db467347a924e783861 (patch)
treec8f1ea93f4e74592323c8fa1755c982c317106b9 /include/miiphy.h
parent8dd7186ca7821446c6f46b6cccefab502912f2e0 (diff)
parent4e6fed49becc7e8d9639966fd34695583192a3ee (diff)
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
bbmiiphy clean up and DM alignment, finally gets rid of the static bbmiiphy variables and plugs bbmiiphy into MDIO framework.
Diffstat (limited to 'include/miiphy.h')
-rw-r--r--include/miiphy.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index 1e6c7041fdc..b879fd16ae3 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -44,6 +44,7 @@ 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);
@@ -64,8 +65,6 @@ void mdio_list_devices(void);
#define BB_MII_DEVNAME "bb_miiphy"
struct bb_miiphy_bus {
- char name[MDIO_NAME_LEN];
- int (*init)(struct bb_miiphy_bus *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);
@@ -73,19 +72,11 @@ struct bb_miiphy_bus {
int (*set_mdc)(struct bb_miiphy_bus *bus, int v);
int (*delay)(struct bb_miiphy_bus *bus);
void *priv;
+ struct mii_dev mii;
};
-extern struct bb_miiphy_bus bb_miiphy_buses[];
-extern int bb_miiphy_buses_num;
-
-/**
- * bb_miiphy_init() - Initialize bit-banged MII bus driver
- *
- * It is called during the generic post-relocation init sequence.
- *
- * Return: 0 if OK
- */
-int bb_miiphy_init(void);
+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,