All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Scharsig <esw@bus-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] Fix: if using crc32 command watchdog timed out
Date: Mon, 18 Jul 2011 08:31:04 +0200	[thread overview]
Message-ID: <4E23D328.2030601@bus-elektronik.de> (raw)
In-Reply-To: <4E12BC93.1000108@bus-elektronik.de>

* 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(-)

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",
 			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",
-- 
1.7.3.4

  parent reply	other threads:[~2011-07-18  6:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05  7:26 [U-Boot] [PATCH] Fix: if using crc32 command watchdog timed out Jens Scharsig
2011-07-16  9:53 ` Albert ARIBAUD
2011-07-17  6:25   ` Jens Scharsig
2011-07-17  9:18     ` Albert ARIBAUD
2011-07-18  6:31 ` Jens Scharsig [this message]
2011-07-18  6:42   ` [U-Boot] [PATCH V2] " Albert ARIBAUD
2011-07-18  6:46 ` [U-Boot] [PATCH V3] " Jens Scharsig
2011-07-25 22:41   ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E23D328.2030601@bus-elektronik.de \
    --to=esw@bus-elektronik.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.