#include <ioports.h>
#include <ppc_asm.tmpl>
-#include <malloc.h>
#include <miiphy.h>
#include <asm/global_data.h>
-struct bb_miiphy_bus *bb_miiphy_alloc(void)
-{
- struct bb_miiphy_bus *bus;
-
- bus = malloc(sizeof(*bus));
- if (!bus)
- return bus;
-
- mdio_init(&bus->mii);
-
- return bus;
-}
-
-void bb_miiphy_free(struct bb_miiphy_bus *bus)
-{
- free(bus);
-}
-
/*****************************************************************************
*
* Utility to send the preamble, address, and register (common to read
#define BB_MII_DEVNAME "bb_miiphy"
-struct bb_miiphy_bus;
-
struct bb_miiphy_bus_ops {
int (*mdio_active)(struct mii_dev *miidev);
int (*mdio_tristate)(struct mii_dev *miidev);
int (*delay)(struct mii_dev *miidev);
};
-struct bb_miiphy_bus {
- struct mii_dev mii;
-};
-
-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, 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,