X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_ide.c;h=1adfe2bfaf8b49154c1db828cdb0cff81626b4cc;hb=82f4c6ac84b3fe81359f863a476196def9fb35ab;hp=915ee76361d1a8e52353053ea97e00f62d180bdd;hpb=1a344f298d9d334f7bec631432c10c0666d04757;p=u-boot diff --git a/common/cmd_ide.c b/common/cmd_ide.c index 915ee76361..1adfe2bfaf 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -413,7 +413,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } part = simple_strtoul(++ep, NULL, 16); } - if (get_partition_info (&ide_dev_desc[dev], part, &info)) { + if (get_partition_info (ide_dev_desc, part, &info)) { SHOW_BOOT_PROGRESS (-1); return 1; } @@ -450,11 +450,12 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) checksum = ntohl(hdr->ih_hcrc); hdr->ih_hcrc = 0; - if (crc32 (0, (char *)&hdr, sizeof(image_header_t)) != checksum) { + if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) { puts ("\n** Bad Header Checksum **\n"); SHOW_BOOT_PROGRESS (-2); return 1; } + hdr->ih_hcrc = htonl(checksum); /* restore checksum for later use */ print_image_hdr (hdr); @@ -870,7 +871,7 @@ input_swap_data(int dev, ulong *sect_buf, int words) dbuf+=1; } } -#else +#else volatile ushort *pbuf = (ushort *)(ATA_CURR_BASE(dev)+ATA_DATA_REG); ushort *dbuf = (ushort *)sect_buf;