Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / board / amlogic / p212 / p212.c
index 546c4d9c86d0e5bd39cf3a13fc175d598d0edb55..fbc49e95651f20c99027d7c8e5b1a91d564ed94a 100644 (file)
@@ -6,7 +6,9 @@
 
 #include <common.h>
 #include <dm.h>
-#include <environment.h>
+#include <env.h>
+#include <init.h>
+#include <net.h>
 #include <asm/io.h>
 #include <asm/arch/gx.h>
 #include <asm/arch/sm.h>
@@ -32,6 +34,8 @@ int misc_init_r(void)
                                          mac_addr, EFUSE_MAC_SIZE);
                if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
                        eth_env_set_enetaddr("ethaddr", mac_addr);
+               else
+                       meson_generate_serial_ethaddr();
        }
 
        if (!env_get("serial#")) {