#include <net.h>
#include <net/tftp.h>
#include <malloc.h>
+#include <mapmem.h>
#include <dfu.h>
#include <errno.h>
#include <mtd/cfi_flash.h>
}
got_update_file:
- fit = (void *)addr;
+ fit = map_sysmem(addr, 0);
if (!fit_check_format((void *)fit)) {
printf("Bad FIT format of the update file, aborting "
#include <common.h>
#include <malloc.h>
+#include <mapmem.h>
#include <errno.h>
#include <dfu.h>
}
if (op == DFU_OP_WRITE)
- memcpy(dfu->data.ram.start + offset, buf, *len);
+ memcpy(map_sysmem(dfu->data.ram.start + offset, 0), buf, *len);
else
- memcpy(buf, dfu->data.ram.start + offset, *len);
+ memcpy(buf, map_sysmem(dfu->data.ram.start + offset, 0), *len);
return 0;
}
}
dfu->layout = DFU_RAM_ADDR;
- dfu->data.ram.start = (void *)simple_strtoul(argv[1], NULL, 16);
+ dfu->data.ram.start = simple_strtoul(argv[1], NULL, 16);
dfu->data.ram.size = simple_strtoul(argv[2], NULL, 16);
dfu->write_medium = dfu_write_medium_ram;