summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-10-29 16:30:33 -0400
committerTom Rini <trini@konsulko.com>2015-10-29 16:30:33 -0400
commit0eb4cf9c14315e1976a116de75da6f420ac0e8dd (patch)
tree3933d354a6be71cbe66d583fec3f5b2479e596ee /common
parent446d37c1acc76680770400fd90e6c502e49d72df (diff)
parentac1d31380618f3f68bf7f05b73b6ab0cdeab0e9f (diff)
downloadblackbird-obmc-uboot-0eb4cf9c14315e1976a116de75da6f420ac0e8dd.tar.gz
blackbird-obmc-uboot-0eb4cf9c14315e1976a116de75da6f420ac0e8dd.zip
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'common')
-rw-r--r--common/miiphyutil.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index c88c28adbf..e499b58836 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -152,6 +152,11 @@ struct mii_dev *mdio_alloc(void)
return bus;
}
+void mdio_free(struct mii_dev *bus)
+{
+ free(bus);
+}
+
int mdio_register(struct mii_dev *bus)
{
if (!bus || !bus->name || !bus->read || !bus->write)
@@ -173,6 +178,20 @@ int mdio_register(struct mii_dev *bus)
return 0;
}
+int mdio_unregister(struct mii_dev *bus)
+{
+ if (!bus)
+ return 0;
+
+ /* delete it from the list */
+ list_del(&bus->link);
+
+ if (current_mii == bus)
+ current_mii = NULL;
+
+ return 0;
+}
+
void mdio_list_devices(void)
{
struct list_head *entry;
OpenPOWER on IntegriCloud