dm: eth: Add support for aliases

Allow network devices to be referred to as "eth0" instead of
"eth@12345678" when specified in ethact.

Add tests to verify this behavior.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Joe Hershberger
2015-03-22 17:09:16 -05:00
committed by Simon Glass
parent bfacad7da1
commit e58780dcb7
5 changed files with 74 additions and 11 deletions

View File

@@ -18,6 +18,8 @@
testfdt3 = "/b-test";
testfdt5 = "/some-bus/c-test@5";
testfdt8 = "/a-test";
eth0 = "/eth@10002000";
eth5 = &eth_5;
};
uart0: serial {
@@ -172,7 +174,7 @@
fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x00>;
};
eth@10003000 {
eth_5: eth@10003000 {
compatible = "sandbox,eth";
reg = <0x10003000 0x1000>;
fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x11>;