فهرست منبع

Merge branch 'master' of /home/wd/git/u-boot/custodians

Wolfgang Denk 15 سال پیش
والد
کامیت
f81c3d7232
2فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 4 0
      drivers/mtd/nand/nand_util.c
  2. 1 1
      nand_spl/nand_boot_fsl_elbc.c

+ 4 - 0
drivers/mtd/nand/nand_util.c

@@ -508,6 +508,8 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t write_size;
 
+		WATCHDOG_RESET ();
+
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 			printf ("Skip bad block 0x%08llx\n",
 				offset & ~(nand->erasesize - 1));
@@ -578,6 +580,8 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t read_length;
 
+		WATCHDOG_RESET ();
+
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 			printf ("Skipping bad block 0x%08llx\n",
 				offset & ~(nand->erasesize - 1));

+ 1 - 1
nand_spl/nand_boot_fsl_elbc.c

@@ -120,7 +120,7 @@ static void nand_load(unsigned int offs, int uboot_size, uchar *dst)
 
 			pos += page_size;
 			offs += page_size;
-		} while (offs & (block_size - 1));
+		} while ((offs & (block_size - 1)) && (pos < uboot_size));
 	}
 }