diff mbox

[U-Boot,V2] Fix: if using crc32 command watchdog timed out

Message ID 4E23D328.2030601@bus-elektronik.de
State Accepted
Headers show

Commit Message

esw@bus-elektronik.de July 18, 2011, 6:31 a.m. UTC
* Fix: if using crc32 command watchdog timed out
* change function call crc32(..) to the watchdog save variant
  crc_32_wd(..) to support watchdog reset


Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
 common/cmd_mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

 			addr, addr + length - 1, crc);
@@ -1137,7 +1137,7 @@ usage:
 	addr += base_address;
 	length = simple_strtoul(*av++, NULL, 16);

-	crc = crc32(0, (const uchar *) addr, length);
+	crc = crc32_wd (0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	if (!verify) {
 		printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",

Comments

Albert ARIBAUD July 18, 2011, 6:42 a.m. UTC | #1
Hi Jens,

Le 18/07/2011 08:31, Jens Scharsig a écrit :
> * Fix: if using crc32 command watchdog timed out
> * change function call crc32(..) to the watchdog save variant
>    crc_32_wd(..) to support watchdog reset
>
>
> Signed-off-by: Jens Scharsig<esw@bus-elektronik.de>
> ---

Sorry for nitpicking again -- can you fix the typo in the commit 
message? I assume it is "watchdog-safe", not "watchdog save".

Amicalement,
diff mbox

Patch

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index a5576aa..4daa1b3 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -1092,7 +1092,7 @@  int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int
argc, char * const argv[])

 	length = simple_strtoul (argv[2], NULL, 16);

-	crc = crc32 (0, (const uchar *) addr, length);
+	crc = crc32_wd (0, (const uchar *) addr, length, CHUNKSZ_CRC32);

 	printf ("CRC32 for %08lx ... %08lx ==> %08lx\n",