Merge tag 'xilinx-for-v2018.05-rc2' of git://git.denx.de/u-boot-microblaze
[oweals/u-boot.git] / arch / arm / mach-omap2 / utils.c
index d4f171b0ee15440a3d19495cabe6086198673532..1d3962500d25a6afd8e061c4ad6dd7e9fc59c688 100644 (file)
@@ -5,8 +5,11 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
+#include <environment.h>
 #include <asm/setup.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/omap_common.h>
+
 static void do_cancel_out(u32 *num, u32 *den, u32 factor)
 {
        while (1) {
@@ -26,6 +29,9 @@ static void omap_set_fastboot_cpu(void)
        u32 cpu_rev = omap_revision();
 
        switch (cpu_rev) {
+       case DRA762_ES1_0:
+               cpu = "DRA762";
+               break;
        case DRA752_ES1_0:
        case DRA752_ES1_1:
        case DRA752_ES2_0:
@@ -33,6 +39,7 @@ static void omap_set_fastboot_cpu(void)
                break;
        case DRA722_ES1_0:
        case DRA722_ES2_0:
+       case DRA722_ES2_1:
                cpu = "DRA722";
                break;
        default:
@@ -211,6 +218,9 @@ void omap_die_id_usbethaddr(void)
                mac[5] = (die_id[0] >> 8) & 0xff;
 
                eth_env_set_enetaddr("usbethaddr", mac);
+
+               if (!env_get("ethaddr"))
+                       eth_env_set_enetaddr("ethaddr", mac);
        }
 }