diff options
Diffstat (limited to 'board/gdsys/405ep/io.c')
-rw-r--r-- | board/gdsys/405ep/io.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/board/gdsys/405ep/io.c b/board/gdsys/405ep/io.c index 03d796cdb8..81b49659ff 100644 --- a/board/gdsys/405ep/io.c +++ b/board/gdsys/405ep/io.c @@ -172,8 +172,17 @@ int last_stage_init(void) print_fpga_info(); - miiphy_register(CONFIG_SYS_GBIT_MII_BUSNAME, - bb_miiphy_read, bb_miiphy_write); + int retval; + struct mii_dev *mdiodev = mdio_alloc(); + if (!mdiodev) + return -ENOMEM; + strncpy(mdiodev->name, CONFIG_SYS_GBIT_MII_BUSNAME, MDIO_NAME_LEN); + mdiodev->read = bb_miiphy_read; + mdiodev->write = bb_miiphy_write; + + retval = mdio_register(mdiodev); + if (retval < 0) + return retval; for (k = 0; k < 32; ++k) configure_gbit_phy(k); |