projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OMAP3: igep00x0: Fix boot hang and add support for status LED.
[oweals/u-boot.git]
/
common
/
cmd_mem.c
diff --git
a/common/cmd_mem.c
b/common/cmd_mem.c
index 15a4b84efdc95f1f8374673fadac592e4fa64124..bcb3ee325ac9ceaf217bbbe7f86118b55aa1b116 100644
(file)
--- a/
common/cmd_mem.c
+++ b/
common/cmd_mem.c
@@
-12,12
+12,14
@@
*/
#include <common.h>
*/
#include <common.h>
+#include <bootretry.h>
#include <cli.h>
#include <command.h>
#ifdef CONFIG_HAS_DATAFLASH
#include <dataflash.h>
#endif
#include <hash.h>
#include <cli.h>
#include <command.h>
#ifdef CONFIG_HAS_DATAFLASH
#include <dataflash.h>
#endif
#include <hash.h>
+#include <inttypes.h>
#include <watchdog.h>
#include <asm/io.h>
#include <linux/compiler.h>
#include <watchdog.h>
#include <asm/io.h>
#include <linux/compiler.h>
@@
-214,7
+216,7
@@
static int do_mem_mw(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
#ifdef CONFIG_MX_CYCLIC
}
#ifdef CONFIG_MX_CYCLIC
-
int do_mem_mdc (
cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+
static int do_mem_mdc(
cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
ulong count;
{
int i;
ulong count;
@@
-241,7
+243,7
@@
int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
return 0;
}
-
int do_mem_mwc (
cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+
static int do_mem_mwc(
cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int i;
ulong count;
{
int i;
ulong count;
@@
-337,7
+339,8
@@
static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (word1 != word2) {
ulong offset = buf1 - base;
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
if (word1 != word2) {
ulong offset = buf1 - base;
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
- printf("%s at 0x%p (%#0*llx) != %s at 0x%p (%#0*llx)\n",
+ printf("%s at 0x%p (%#0*"PRIx64") != %s at 0x%p (%#0*"
+ PRIx64 ")\n",
type, (void *)(addr1 + offset), size, word1,
type, (void *)(addr2 + offset), size, word2);
#else
type, (void *)(addr1 + offset), size, word1,
type, (void *)(addr2 + offset), size, word2);
#else
@@
-479,6
+482,9
@@
static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if ((count % (64 << 10)) == 0)
WATCHDOG_RESET();
}
if ((count % (64 << 10)) == 0)
WATCHDOG_RESET();
}
+ unmap_sysmem(buf);
+ unmap_sysmem(src);
+
return 0;
}
return 0;
}
@@
-594,7
+600,8
@@
static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc,
}
#ifdef CONFIG_LOOPW
}
#ifdef CONFIG_LOOPW
-int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mem_loopw(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
ulong addr, length, i, bytes;
int size;
{
ulong addr, length, i, bytes;
int size;
@@
-1097,9
+1104,7
@@
mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
if (argc != 2)
return CMD_RET_USAGE;
if (argc != 2)
return CMD_RET_USAGE;
-#ifdef CONFIG_BOOT_RETRY_TIME
- reset_cmd_timeout(); /* got a good command to get here */
-#endif
+ bootretry_reset_cmd_timeout(); /* got a good command to get here */
/* We use the last specified parameters, unless new ones are
* entered.
*/
/* We use the last specified parameters, unless new ones are
* entered.
*/
@@
-1143,7
+1148,7
@@
mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
printf(" %08x", *((u32 *)ptr));
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
else if (size == 8)
printf(" %08x", *((u32 *)ptr));
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
else if (size == 8)
- printf(" %016
llx"
, *((u64 *)ptr));
+ printf(" %016
" PRIx64
, *((u64 *)ptr));
#endif
else if (size == 2)
printf(" %04x", *((u16 *)ptr));
#endif
else if (size == 2)
printf(" %04x", *((u16 *)ptr));
@@
-1158,9
+1163,8
@@
mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
if (incrflag)
addr += nbytes ? -size : size;
nbytes = 1;
if (incrflag)
addr += nbytes ? -size : size;
nbytes = 1;
-#ifdef CONFIG_BOOT_RETRY_TIME
- reset_cmd_timeout(); /* good enough to not time out */
-#endif
+ /* good enough to not time out */
+ bootretry_reset_cmd_timeout();
}
#ifdef CONFIG_BOOT_RETRY_TIME
else if (nbytes == -2) {
}
#ifdef CONFIG_BOOT_RETRY_TIME
else if (nbytes == -2) {
@@
-1176,11
+1180,9
@@
mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
#endif
nbytes = endp - console_buffer;
if (nbytes) {
#endif
nbytes = endp - console_buffer;
if (nbytes) {
-#ifdef CONFIG_BOOT_RETRY_TIME
/* good enough to not time out
*/
/* good enough to not time out
*/
- reset_cmd_timeout();
-#endif
+ bootretry_reset_cmd_timeout();
if (size == 4)
*((u32 *)ptr) = i;
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
if (size == 4)
*((u32 *)ptr) = i;
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA