diff options
Diffstat (limited to 'include/miiphy.h')
| -rw-r--r-- | include/miiphy.h | 36 | 
1 files changed, 11 insertions, 25 deletions
| diff --git a/include/miiphy.h b/include/miiphy.h index 63ec3bcc76b..00d0b9b6a43 100644 --- a/include/miiphy.h +++ b/include/miiphy.h @@ -61,33 +61,19 @@ 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); -	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 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);  }; -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); - -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 */ | 
