[U-Boot] nand commands missing wtchdog reset
Scott Wood
scottwood at freescale.com
Mon Jan 31 20:16:59 CET 2011
On Mon, 31 Jan 2011 09:05:55 +0100
Jaap de Jong <jaap.dejong at nedap.com> wrote:
> Hi all,
> On my board (at91sam9263ek) I have enabled the watchdog.
> It will reset the processor after about 16 seconds.
> It looks like it is working but if I'm writing a large file into nand it
> seems that the watchdog is not reset and finally my processor resets.
> I've patched it, but I'm not sure if it is the right way to do it this
> way...
So far we've been putting the watchdog resets in higher-level
functions. It looks like the block-skipping versions have them, but
the non-block-skipping versions don't (and the former will call the
latter if it doesn't see any bad blocks).
So I think this should go in nand_read() and nand_write(). If things
hang up inside the low-level wait that should trigger the watchdog.
> diff -urN a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> --- a/drivers/mtd/nand/nand_base.c 2010-12-22 20:22:14.000000000 +0100
> +++ b/drivers/mtd/nand/nand_base.c 2011-01-31 08:45:07.818135600 +0100
> @@ -447,6 +447,7 @@
> if (chip->dev_ready)
> if (chip->dev_ready(mtd))
> break;
> + WATCHDOG_RESET ();
> }
> }
>
> @@ -730,6 +731,7 @@
> if (this->read_byte(mtd) & NAND_STATUS_READY)
> break;
> }
> + WATCHDOG_RESET ();
> }
> #ifdef PPCHAMELON_NAND_TIMER_HACK
> reset_timer();
>
This patch is whitespace-mangled. Try using git send-email.
-Scott
More information about the U-Boot
mailing list