summaryrefslogtreecommitdiffstats
path: root/board/esd/common/auto_update.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2005-10-13 16:45:02 +0200
committerWolfgang Denk <wd@pollux.denx.de>2005-10-13 16:45:02 +0200
commit77ddac9480d63a80b6bb76d7ee4dcc2d1070867e (patch)
treee9563b2f28ea59062b90bb5712f141e8e9798aee /board/esd/common/auto_update.c
parent17a8b276ba2b3499b75cd60b0b5289dbbea7967b (diff)
downloadblackbird-obmc-uboot-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.tar.gz
blackbird-obmc-uboot-77ddac9480d63a80b6bb76d7ee4dcc2d1070867e.zip
Cleanup for GCC-4.x
Diffstat (limited to 'board/esd/common/auto_update.c')
-rw-r--r--board/esd/common/auto_update.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c
index 0604a4e6fe..1dceb3affb 100644
--- a/board/esd/common/auto_update.c
+++ b/board/esd/common/auto_update.c
@@ -103,7 +103,7 @@ int au_check_cksum_valid(int i, long nbytes)
/* check the data CRC */
checksum = ntohl(hdr->ih_dcrc);
- if (crc32 (0, (char *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
+ if (crc32 (0, (uchar *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
!= checksum) {
printf ("Image %s bad data checksum\n", au_image[i].name);
return -1;
@@ -140,7 +140,7 @@ int au_check_header_valid(int i, long nbytes)
checksum = ntohl(hdr->ih_hcrc);
hdr->ih_hcrc = 0;
- if (crc32 (0, (char *)hdr, sizeof(*hdr)) != checksum) {
+ if (crc32 (0, (uchar *)hdr, sizeof(*hdr)) != checksum) {
printf ("Image %s bad header checksum\n", au_image[i].name);
return -1;
}
@@ -283,12 +283,12 @@ int au_do_update(int i, long sz)
*/
if (au_image[i].type != AU_NAND) {
debug ("flash_write(%p, %lx %x)\n", addr, start, nbytes);
- rc = flash_write(addr, start, nbytes);
+ rc = flash_write((uchar *)addr, start, nbytes);
} else {
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
debug ("nand_rw(%p, %lx %x)\n", addr, start, nbytes);
rc = nand_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2,
- start, nbytes, &total, addr);
+ start, nbytes, (size_t *)&total, (uchar *)addr);
debug ("nand_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes);
#endif
}
@@ -301,12 +301,12 @@ int au_do_update(int i, long sz)
* check the dcrc of the copy
*/
if (au_image[i].type != AU_NAND) {
- rc = crc32 (0, (char *)(start + off), ntohl(hdr->ih_size));
+ rc = crc32 (0, (uchar *)(start + off), ntohl(hdr->ih_size));
} else {
#if (CONFIG_COMMANDS & CFG_CMD_NAND)
rc = nand_rw(nand_dev_desc, NANDRW_READ | NANDRW_JFFS2 | NANDRW_JFFS2_SKIP,
- start, nbytes, &total, addr);
- rc = crc32 (0, (char *)(addr + off), ntohl(hdr->ih_size));
+ start, nbytes, (size_t *)&total, (uchar *)addr);
+ rc = crc32 (0, (uchar *)(addr + off), ntohl(hdr->ih_size));
#endif
}
if (rc != ntohl(hdr->ih_dcrc)) {
OpenPOWER on IntegriCloud