]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/davinci/da8xxevm/da850evm.c
arm: da850-evm: Enable DM and device tree support for da850-evm
[people/ms/u-boot.git] / board / davinci / da8xxevm / da850evm.c
index 516d86df5097208c7b0d93595934f44c17adf8f4..83c9f2940fe87791908d6c7a739ad14bd98ad4ee 100644 (file)
@@ -60,7 +60,7 @@ static int get_mac_addr(u8 *addr)
                return -1;
        }
 
-       ret = spi_flash_read(flash, CFG_MAC_ADDR_OFFSET, 6, addr);
+       ret = spi_flash_read(flash, (CFG_MAC_ADDR_OFFSET) + 1, 7, addr);
        if (ret) {
                printf("Error - unable to read MAC address from SPI flash.\n");
                return -1;
@@ -140,6 +140,7 @@ int misc_init_r(void)
        uchar buff[6];
 
        spi_mac_read = get_mac_addr(buff);
+       buff[0] = 0;
 
        /*
         * MAC address not present in the environment