Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[oweals/u-boot.git] / board / ti / dra7xx / evm.c
index 9657c75f23575fc73ec7be92ee50798266315c28..1b60b8f672eaa4ca7116365730996acad389d51c 100644 (file)
@@ -14,6 +14,7 @@
 #include <palmas.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
+#include <asm/arch/sata.h>
 
 #include "mux_data.h"
 
@@ -77,6 +78,12 @@ int board_init(void)
        return 0;
 }
 
+int board_late_init(void)
+{
+       omap_sata_init();
+       return 0;
+}
+
 /**
  * @brief misc_init_r - Configure EVM board specific configurations
  * such as power configurations, ethernet initialization as phase2 of
@@ -195,12 +202,12 @@ int board_eth_init(bd_t *bis)
        /* try reading mac address from efuse */
        mac_lo = readl((*ctrl)->control_core_mac_id_0_lo);
        mac_hi = readl((*ctrl)->control_core_mac_id_0_hi);
-       mac_addr[0] = mac_hi & 0xFF;
+       mac_addr[0] = (mac_hi & 0xFF0000) >> 16;
        mac_addr[1] = (mac_hi & 0xFF00) >> 8;
-       mac_addr[2] = (mac_hi & 0xFF0000) >> 16;
-       mac_addr[3] = mac_lo & 0xFF;
+       mac_addr[2] = mac_hi & 0xFF;
+       mac_addr[3] = (mac_lo & 0xFF0000) >> 16;
        mac_addr[4] = (mac_lo & 0xFF00) >> 8;
-       mac_addr[5] = (mac_lo & 0xFF0000) >> 16;
+       mac_addr[5] = mac_lo & 0xFF;
 
        if (!getenv("ethaddr")) {
                printf("<ethaddr> not set. Validating first E-fuse MAC\n");