diff options
Diffstat (limited to 'cmd/load.c')
-rw-r--r-- | cmd/load.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/cmd/load.c b/cmd/load.c index 540361b43f0..20d802502ae 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -7,7 +7,6 @@ /* * Serial up- and download support */ -#include <common.h> #include <command.h> #include <console.h> #include <cpu_func.h> @@ -142,7 +141,6 @@ static int do_load_serial(struct cmd_tbl *cmdtp, int flag, int argc, static ulong load_serial(long offset) { - struct lmb lmb; char record[SREC_MAXRECLEN + 1]; /* buffer for one S-Record */ char binbuf[SREC_MAXBINLEN]; /* buffer for binary data */ int binlen; /* no. of data bytes in S-Rec. */ @@ -155,8 +153,6 @@ static ulong load_serial(long offset) int line_count = 0; long ret; - lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob); - while (read_record(record, SREC_MAXRECLEN + 1) >= 0) { type = srec_decode(record, &binlen, &addr, binbuf); @@ -183,7 +179,7 @@ static ulong load_serial(long offset) { void *dst; - ret = lmb_reserve(&lmb, store_addr, binlen); + ret = lmb_reserve(store_addr, binlen); if (ret) { printf("\nCannot overwrite reserved area (%08lx..%08lx)\n", store_addr, store_addr + binlen); @@ -192,7 +188,7 @@ static ulong load_serial(long offset) dst = map_sysmem(store_addr, binlen); memcpy(dst, binbuf, binlen); unmap_sysmem(dst); - lmb_free(&lmb, store_addr, binlen); + lmb_free(store_addr, binlen); } if ((store_addr) < start_addr) start_addr = store_addr; @@ -418,7 +414,6 @@ static int write_record(char *buf) #endif - #if defined(CONFIG_CMD_LOADB) /* * loadb command (load binary) included @@ -442,7 +437,6 @@ static void set_kerm_bin_mode(unsigned long *); static int k_recv(void); static ulong load_serial_bin(ulong offset); - static char his_eol; /* character he needs at end of packet */ static int his_pad_count; /* number of pad chars he needs */ static char his_pad_char; /* pad chars he needs */ @@ -558,7 +552,6 @@ static int do_load_serial_bin(struct cmd_tbl *cmdtp, int flag, int argc, return rcode; } - static ulong load_serial_bin(ulong offset) { int size, i; @@ -653,7 +646,6 @@ static void send_nack(int n) s1_sendpacket(a_b); } - static void (*os_data_init)(void); static void (*os_data_char)(char new_char); static int os_data_state, os_data_state_saved; @@ -694,7 +686,6 @@ static void set_kerm_bin_mode(unsigned long *addr) os_data_char = bin_data_char; } - /* k_data_* simply handles the kermit escape translations */ static int k_data_escape, k_data_escape_saved; static void k_data_init(void) @@ -1067,7 +1058,6 @@ static ulong load_serial_ymodem(ulong offset, int mode) xyzModem_stream_terminate(false, &getcxmodem); xyzModem_stream_close(&err); - flush_cache(offset, ALIGN(size, ARCH_DMA_MINALIGN)); printf("## Total Size = 0x%08x = %d Bytes\n", size, size); @@ -1142,7 +1132,6 @@ U_BOOT_CMD( * SAVES always requires LOADS support, but not vice versa */ - #if defined(CONFIG_CMD_SAVES) #ifdef CONFIG_SYS_LOADS_BAUD_CHANGE U_BOOT_CMD( @@ -1163,7 +1152,6 @@ U_BOOT_CMD( #endif /* CONFIG_CMD_SAVES */ #endif /* CONFIG_CMD_LOADS */ - #if defined(CONFIG_CMD_LOADB) U_BOOT_CMD( loadb, 3, 0, do_load_serial_bin, |