summaryrefslogtreecommitdiff
path: root/drivers/net/sh_eth.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-08-15 16:38:39 -0400
committerTom Rini <trini@konsulko.com>2016-08-15 16:38:39 -0400
commit2ef98d33166e5c22a61eba29c20e236b72f1e8a2 (patch)
tree288afa85ba7134787f5c7146b0d87aaeb07d9b78 /drivers/net/sh_eth.c
parentb064c9124acddbcdc70843f62fda13a2d7d7a392 (diff)
parentcc2593128f7ad1b879e9e5bd3097f6c717cf4c9a (diff)
downloadu-boot-imx-2ef98d33166e5c22a61eba29c20e236b72f1e8a2.zip
u-boot-imx-2ef98d33166e5c22a61eba29c20e236b72f1e8a2.tar.gz
u-boot-imx-2ef98d33166e5c22a61eba29c20e236b72f1e8a2.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'drivers/net/sh_eth.c')
-rw-r--r--drivers/net/sh_eth.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 2fa2016..79c1db2 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -566,7 +566,17 @@ int sh_eth_initialize(bd_t *bd)
eth_register(dev);
bb_miiphy_buses[0].priv = eth;
- miiphy_register(dev->name, bb_miiphy_read, bb_miiphy_write);
+ int retval;
+ struct mii_dev *mdiodev = mdio_alloc();
+ if (!mdiodev)
+ return -ENOMEM;
+ strncpy(mdiodev->name, dev->name, MDIO_NAME_LEN);
+ mdiodev->read = bb_miiphy_read;
+ mdiodev->write = bb_miiphy_write;
+
+ retval = mdio_register(mdiodev);
+ if (retval < 0)
+ return retval;
if (!eth_getenv_enetaddr("ethaddr", dev->enetaddr))
puts("Please set MAC address\n");