extern struct bb_miiphy_bus bb_miiphy_buses[];
extern int bb_miiphy_buses_num;
-void bb_miiphy_init(void);
+/**
+ * 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);
+
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);
#define ESTATUS_1000XF 0x8000
#define ESTATUS_1000XH 0x4000
-#ifdef CONFIG_DM_MDIO
-
/**
* struct mdio_perdev_priv - Per-device class data for MDIO DM
*
* @ethdev: ethernet device to connect to the PHY
* @interface: MAC-PHY protocol
*
- * @return pointer to phy_device, or 0 on error
+ * Return: pointer to phy_device, or 0 on error
*/
struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr,
struct udevice *ethdev,
*
* @ethdev: ethernet device
*
- * @return pointer to phy_device, or 0 on error
+ * Return: pointer to phy_device, or 0 on error
*/
struct phy_device *dm_eth_phy_connect(struct udevice *ethdev);
-#endif
-
-#ifdef CONFIG_DM_MDIO_MUX
-
/* indicates none of the child buses is selected */
#define MDIO_MUX_SELECT_NONE -1
#define mdio_mux_get_ops(dev) ((struct mdio_mux_ops *)(dev)->driver->ops)
#endif
-
-#endif