]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - net/tftp.c
dm: eth: Add support for ethprime env var
[karo-tx-uboot.git] / net / tftp.c
index 966d1cfba360ce7e7505dd5f806ce13543b0654c..51c67be952222200df6a0ab04ef8a08089641d27 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <mapmem.h>
 #include <net.h>
 #include "tftp.h"
 #include "bootp.h"
@@ -184,7 +185,10 @@ store_block(int block, uchar *src, unsigned len)
        } else
 #endif /* CONFIG_SYS_DIRECT_FLASH_TFTP */
        {
-               (void)memcpy((void *)(load_addr + offset), src, len);
+               void *ptr = map_sysmem(load_addr + offset, len);
+
+               memcpy(ptr, src, len);
+               unmap_sysmem(ptr);
        }
 #ifdef CONFIG_MCAST_TFTP
        if (Multicast)
@@ -299,6 +303,8 @@ static void tftp_complete(void)
                putc('#');
                TftpNumchars++;
        }
+       puts("  ");
+       print_size(TftpTsize, "");
 #endif
        time_start = get_timer(time_start);
        if (time_start > 0) {