diff mbox series

[U-Boot] arm: baltos: use device tree alias to access Ethernet slave

Message ID 20190809052157.22097-1-yegorslists@googlemail.com
State Accepted
Commit debe7a141d017e0f2e97b1c8e284163b5551b60d
Delegated to: Tom Rini
Headers show
Series [U-Boot] arm: baltos: use device tree alias to access Ethernet slave | expand

Commit Message

Yegor Yefremov Aug. 9, 2019, 5:21 a.m. UTC
From: Yegor Yefremov <yegorslists@googlemail.com>

The full path has changed in the recent kernels so that it is
not possible to load them. Aliases "ethernet0" and "ethernet1"
are still present in both legacy and new kernels.

Also, fix error messages to correspond to the taken actions.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 board/vscom/baltos/board.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Tom Rini Aug. 21, 2019, 12:42 p.m. UTC | #1
On Fri, Aug 09, 2019 at 07:21:57AM +0200, yegorslists@googlemail.com wrote:

> From: Yegor Yefremov <yegorslists@googlemail.com>
> 
> The full path has changed in the recent kernels so that it is
> not possible to load them. Aliases "ethernet0" and "ethernet1"
> are still present in both legacy and new kernels.
> 
> Also, fix error messages to correspond to the taken actions.
> 
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index c5949ad267..036a356578 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -288,15 +288,15 @@  int ft_board_setup(void *blob, bd_t *bd)
 	mac_addr[5] = header.MAC1[5];
 
 
-	node = fdt_path_offset(blob, "/ocp/ethernet/slave@4a100200");
+	node = fdt_path_offset(blob, "ethernet0");
 	if (node < 0) {
-		printf("no /soc/fman/ethernet path offset\n");
+		printf("no ethernet0 path offset\n");
 		return -ENODEV;
 	}
 
 	ret = fdt_setprop(blob, node, "mac-address", &mac_addr, 6);
 	if (ret) {
-		printf("error setting local-mac-address property\n");
+		printf("error setting mac-address property\n");
 		return -ENODEV;
 	}
 
@@ -308,15 +308,15 @@  int ft_board_setup(void *blob, bd_t *bd)
 	mac_addr[4] = header.MAC2[4];
 	mac_addr[5] = header.MAC2[5];
 
-	node = fdt_path_offset(blob, "/ocp/ethernet/slave@4a100300");
+	node = fdt_path_offset(blob, "ethernet1");
 	if (node < 0) {
-		printf("no /soc/fman/ethernet path offset\n");
+		printf("no ethernet1 path offset\n");
 		return -ENODEV;
 	}
 
 	ret = fdt_setprop(blob, node, "mac-address", &mac_addr, 6);
 	if (ret) {
-		printf("error setting local-mac-address property\n");
+		printf("error setting mac-address property\n");
 		return -ENODEV;
 	}