Skip to contentSkip to conversation

arm: baltos: use device tree alias to access Ethernet slave

PATCH New yegorslists at googlemail.com 2 participants 2 messages Aug 9, 2019 – Aug 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: baltos: use device tree alias to access Ethernet slave

From: Yegor Yefremov <[email protected]>

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.

---
 board/vscom/baltos/board.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
board/vscom/baltos/board.c +6 -6
index c5949ad267..036a356578 100644
@@ -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 at 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;
 	}
 
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 arm: baltos: use device tree alias to access Ethernet slave

Quoted 9 lines · yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190821/f931ebf2/attachment.sig>