aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-08-21 22:56:01 +0200
committerWolfgang Denk <wd@denx.de>2009-08-21 22:56:01 +0200
commitf81c3d7232622a2b8c6832d3378dfa775d0e40c0 (patch)
tree0b134e257065a049217655f27d73afc44fe13262
parentb644006e1a7baa227aedc606ecdf0bb5eeb24cab (diff)
parent269610f6ba2e4a7bc27d2e53d43160614016964f (diff)
downloadu-boot-linaro-stable-f81c3d7232622a2b8c6832d3378dfa775d0e40c0.tar.gz
Merge branch 'master' of /home/wd/git/u-boot/custodians
-rw-r--r--drivers/mtd/nand/nand_util.c4
-rw-r--r--nand_spl/nand_boot_fsl_elbc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 694ead68a..bec927706 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/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));
diff --git a/nand_spl/nand_boot_fsl_elbc.c b/nand_spl/nand_boot_fsl_elbc.c
index 0d0c44e1e..7f14a6fe4 100644
--- a/nand_spl/nand_boot_fsl_elbc.c
+++ b/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));
}
}