diff options
author | Tom Rini <trini@konsulko.com> | 2016-12-09 07:10:39 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-12-09 07:10:39 -0500 |
commit | 3edc0c252257e4afed163a3a74aba24a5509b198 (patch) | |
tree | de01174e841e19844a158569113c559993764248 /common/miiphyutil.c | |
parent | bb135a0180c31fbd7456021fb9700b49bba7f533 (diff) | |
parent | b63cb3abbc626dc918828f302bd8ea72e7c226d2 (diff) | |
download | u-boot-3edc0c252257e4afed163a3a74aba24a5509b198.tar.gz |
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'common/miiphyutil.c')
-rw-r--r-- | common/miiphyutil.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index aca18db52a..0a83d6463d 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -107,6 +107,18 @@ int mdio_register(struct mii_dev *bus) return 0; } +int mdio_register_seq_name(struct mii_dev *bus, int seq) +{ + int ret; + + /* Setup a unique name for each mdio bus */ + ret = snprintf(bus->name, MDIO_NAME_LEN, "eth%d", seq); + if (ret < 0) + return ret; + + return mdio_register(bus); +} + int mdio_unregister(struct mii_dev *bus) { if (!bus) |