diff options
author | Tom Rini <trini@konsulko.com> | 2016-08-15 20:38:39 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-15 20:38:39 (GMT) |
commit | 2ef98d33166e5c22a61eba29c20e236b72f1e8a2 (patch) | |
tree | 288afa85ba7134787f5c7146b0d87aaeb07d9b78 /board/gdsys/mpc8308/hrcon.c | |
parent | b064c9124acddbcdc70843f62fda13a2d7d7a392 (diff) | |
parent | cc2593128f7ad1b879e9e5bd3097f6c717cf4c9a (diff) | |
download | u-boot-2ef98d33166e5c22a61eba29c20e236b72f1e8a2.tar.xz |
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'board/gdsys/mpc8308/hrcon.c')
-rw-r--r-- | board/gdsys/mpc8308/hrcon.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c index 880b638..f55893f 100644 --- a/board/gdsys/mpc8308/hrcon.c +++ b/board/gdsys/mpc8308/hrcon.c @@ -162,8 +162,17 @@ int last_stage_init(void) } if (hw_type_cat) { - miiphy_register(bb_miiphy_buses[0].name, bb_miiphy_read, - bb_miiphy_write); + int retval; + struct mii_dev *mdiodev = mdio_alloc(); + if (!mdiodev) + return -ENOMEM; + strncpy(mdiodev->name, bb_miiphy_buses[0].name, MDIO_NAME_LEN); + mdiodev->read = bb_miiphy_read; + mdiodev->write = bb_miiphy_write; + + retval = mdio_register(mdiodev); + if (retval < 0) + return retval; for (mux_ch = 0; mux_ch < MAX_MUX_CHANNELS; ++mux_ch) { if ((mux_ch == 1) && !ch0_rgmii2_present) continue; @@ -199,8 +208,18 @@ int last_stage_init(void) osd_probe(k + 4); #endif if (hw_type_cat) { - miiphy_register(bb_miiphy_buses[k].name, - bb_miiphy_read, bb_miiphy_write); + int retval; + struct mii_dev *mdiodev = mdio_alloc(); + if (!mdiodev) + return -ENOMEM; + strncpy(mdiodev->name, bb_miiphy_buses[k].name, + MDIO_NAME_LEN); + mdiodev->read = bb_miiphy_read; + mdiodev->write = bb_miiphy_write; + + retval = mdio_register(mdiodev); + if (retval < 0) + return retval; setup_88e1514(bb_miiphy_buses[k].name, 0); } } |