summaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2021-09-11 19:39:16 +0200
committerAndre Przywara <andre.przywara@arm.com>2022-01-30 01:03:37 +0000
commit2753b07269c099844ccd4c21de5790e3f9b8bdbd (patch)
tree2a83eed5254c2c7126698b81fbfa6a1d60988fdb /board/sunxi
parentb106a14e2f5dfac53d9cd64a11875c011628558d (diff)
sunxi: call fdt_fixup_ethernet again to set macaddr for more aliases
Sometimes some ethernet aliases do not exist in U-Boot DT but they exist in the DT used to boot the system (for example, modified via DT overlays). In this situation setup_environment is called again in ft_board_setup() to generate macaddr environment variable for them. However now the call to fdt_fixup_ethernet() is moved before the call of ft_board_setup(). Call fdt_fixup_ethernet() again to add MAC addresses for the extra ethernet aliases. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> [updated commit message] Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'board/sunxi')
-rw-r--r--board/sunxi/board.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 2790a0f9e8..d0a93da409 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -912,10 +912,12 @@ int ft_board_setup(void *blob, struct bd_info *bd)
int __maybe_unused r;
/*
- * Call setup_environment again in case the boot fdt has
- * ethernet aliases the u-boot copy does not have.
+ * Call setup_environment and fdt_fixup_ethernet again
+ * in case the boot fdt has ethernet aliases the u-boot
+ * copy does not have.
*/
setup_environment(blob);
+ fdt_fixup_ethernet(blob);
bluetooth_dt_fixup(blob);