diff options
author | Michael Walle <michael@walle.cc> | 2021-02-25 16:51:11 +0100 |
---|---|---|
committer | Ramon Fried <rfried.dev@gmail.com> | 2021-06-18 11:29:17 +0300 |
commit | 82a3c9ef20d43d97416589854b4bbcb4c2450c24 (patch) | |
tree | a885f9b30eb15b9871b30c46280be4bb3b955b39 /net | |
parent | 6e424b4acac0dba486a97ecd80a78aa0fea43683 (diff) | |
download | u-boot-82a3c9ef20d43d97416589854b4bbcb4c2450c24.zip u-boot-82a3c9ef20d43d97416589854b4bbcb4c2450c24.tar.gz u-boot-82a3c9ef20d43d97416589854b4bbcb4c2450c24.tar.bz2 |
net: use the same alias stem for ethernet as linux
Linux uses the prefix "ethernet" whereas u-boot uses "eth". This is from
the linux tree:
$ grep "eth[0-9].*=.*&" arch/**/*dts{,i}|wc -l
0
$ grep "ethernet[0-9].*=.*&" arch/**/*dts{,i}|wc -l
633
In u-boot device trees both prefixes are used. Until recently the only
user of the ethernet alias was the sandbox test device tree. This
changed with commit fc054d563bfb ("net: Introduce DSA class for Ethernet
switches"). There, the MAC addresses are inherited based on the devices
sequence IDs which is in turn given by the device tree.
Before there are more users in u-boot and both worlds will differ even
more, rename the alias prefix to "ethernet" to match the linux ones.
Also adapt the test cases and rename any old aliases in the u-boot
device trees.
Cc: David Wu <david.wu@rock-chips.com>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth-uclass.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c index 0b4260d..5146bd6 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -605,8 +605,8 @@ static int eth_pre_remove(struct udevice *dev) return 0; } -UCLASS_DRIVER(eth) = { - .name = "eth", +UCLASS_DRIVER(ethernet) = { + .name = "ethernet", .id = UCLASS_ETH, .post_bind = eth_post_bind, .pre_unbind = eth_pre_unbind, |