projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sandbox: Boot in U-Boot through the standard call
[oweals/u-boot.git]
/
common
/
miiphyutil.c
diff --git
a/common/miiphyutil.c
b/common/miiphyutil.c
index aca18db52a008baaf9b393625f7bfebe1e2abf9a..2db067876e4b8f58263ddf2ceca8209f0f5e207d 100644
(file)
--- a/
common/miiphyutil.c
+++ b/
common/miiphyutil.c
@@
-1,8
+1,7
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2001
* Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com.
/*
* (C) Copyright 2001
* Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-107,6
+106,18
@@
int mdio_register(struct mii_dev *bus)
return 0;
}
return 0;
}
+int mdio_register_seq(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)
int mdio_unregister(struct mii_dev *bus)
{
if (!bus)
@@
-166,6
+177,11
@@
struct mii_dev *mdio_get_current_dev(void)
return current_mii;
}
return current_mii;
}
+struct list_head *mdio_get_list_head(void)
+{
+ return &mii_devs;
+}
+
struct phy_device *mdio_phydev_for_ethname(const char *ethname)
{
struct list_head *entry;
struct phy_device *mdio_phydev_for_ethname(const char *ethname)
{
struct list_head *entry;