projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rockchip: Remove ARCH= references from documentation
[oweals/u-boot.git]
/
cmd
/
load.c
diff --git
a/cmd/load.c
b/cmd/load.c
index 519c309a61cda77dac4daf4d8b08e6dd9fcf3f50..63a94145430a8e465cff44b411e565fd8b21ccb0 100644
(file)
--- a/
cmd/load.c
+++ b/
cmd/load.c
@@
-1,8
+1,7
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
/*
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-11,10
+10,17
@@
#include <common.h>
#include <command.h>
#include <console.h>
#include <common.h>
#include <command.h>
#include <console.h>
+#include <cpu_func.h>
+#include <env.h>
+#include <flash.h>
+#include <image.h>
#include <s_record.h>
#include <net.h>
#include <exports.h>
#include <s_record.h>
#include <net.h>
#include <exports.h>
+#include <serial.h>
#include <xyzModem.h>
#include <xyzModem.h>
+#include <asm/cache.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
DECLARE_GLOBAL_DATA_PTR;
@@
-36,8
+42,8
@@
static int do_echo = 1;
/* -------------------------------------------------------------------- */
#if defined(CONFIG_CMD_LOADS)
/* -------------------------------------------------------------------- */
#if defined(CONFIG_CMD_LOADS)
-static int do_load_serial(
cmd_tbl_t
*cmdtp, int flag, int argc,
- char *
const argv[])
+static int do_load_serial(
struct cmd_tbl
*cmdtp, int flag, int argc,
+ char *const argv[])
{
long offset = 0;
ulong addr;
{
long offset = 0;
ulong addr;
@@
-106,7
+112,7
@@
static int do_load_serial(cmd_tbl_t *cmdtp, int flag, int argc,
rcode = 1;
} else {
printf("## Start Addr = 0x%08lX\n", addr);
rcode = 1;
} else {
printf("## Start Addr = 0x%08lX\n", addr);
- load_addr = addr;
+
image_
load_addr = addr;
}
#ifdef CONFIG_SYS_LOADS_BAUD_CHANGE
}
#ifdef CONFIG_SYS_LOADS_BAUD_CHANGE
@@
-237,7
+243,8
@@
static int read_record(char *buf, ulong len)
#if defined(CONFIG_CMD_SAVES)
#if defined(CONFIG_CMD_SAVES)
-int do_save_serial (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_save_serial(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong offset = 0;
ulong size = 0;
{
ulong offset = 0;
ulong size = 0;
@@
-414,8
+421,8
@@
static int his_pad_count; /* number of pad chars he needs */
static char his_pad_char; /* pad chars he needs */
static char his_quote; /* quote chars he'll use */
static char his_pad_char; /* pad chars he needs */
static char his_quote; /* quote chars he'll use */
-static int do_load_serial_bin(
cmd_tbl_t
*cmdtp, int flag, int argc,
- char *
const argv[])
+static int do_load_serial_bin(
struct cmd_tbl
*cmdtp, int flag, int argc,
+ char *const argv[])
{
ulong offset = 0;
ulong addr;
{
ulong offset = 0;
ulong addr;
@@
-482,12
+489,12
@@
static int do_load_serial_bin(cmd_tbl_t *cmdtp, int flag, int argc,
addr = load_serial_bin(offset);
if (addr == ~0) {
addr = load_serial_bin(offset);
if (addr == ~0) {
- load_addr = 0;
+
image_
load_addr = 0;
printf("## Binary (kermit) download aborted\n");
rcode = 1;
} else {
printf("## Start Addr = 0x%08lX\n", addr);
printf("## Binary (kermit) download aborted\n");
rcode = 1;
} else {
printf("## Start Addr = 0x%08lX\n", addr);
- load_addr = addr;
+
image_
load_addr = addr;
}
}
if (load_baudrate != current_baudrate) {
}
}
if (load_baudrate != current_baudrate) {
@@
-978,7
+985,7
@@
static ulong load_serial_ymodem(ulong offset, int mode)
rc = flash_write((char *) ymodemBuf,
store_addr, res);
if (rc != 0) {
rc = flash_write((char *) ymodemBuf,
store_addr, res);
if (rc != 0) {
- flash_perror
(rc);
+ flash_perror(rc);
return (~0);
}
} else
return (~0);
}
} else