Skip to contentSkip to conversation

add WATCHDOG_RESET() on nand write and read

PATCH New Giulio Benetti 3 participants 4 messages Jun 18, 2009 – Jul 31, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add WATCHDOG_RESET() on nand write and read

I think it's better to put Watchdog reset also inside read and write nand. What do you think?

Signed-off-by giulio.benetti at micronovasrl.com
drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 renamed from drivers/mtd/nand/nand_util.c 2009-06-14 21:30:39.000000000 +0200 +4 -0
diff -urpN b/drivers/mtd/nand/nand_util.c a/drivers/mtd/nand/nand_util.c
@@ -505,6 +505,8 @@ int nand_write_skip_bad(nand_info_t *nan
                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%08zx\n",
                                offset & ~(nand->erasesize - 1));
@@ -575,6 +577,8 @@ int nand_read_skip_bad(nand_info_t *nand
                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%08zx\n",
                                offset & ~(nand->erasesize - 1));
Signature · 3 lines
Giulio Benetti
R&D
Micronova srl
#1 lore raw

PATCH 1/1 add WATCHDOG_RESET() on nand write and read

Dear Scott,

Quoted 18 lines · In message <[email protected]> Giulio Benetti wrote:

I think it's better to put Watchdog reset also inside read and write nand. What do you think?

Signed-off-by giulio.benetti at micronovasrl.com

diff -urpN b/drivers/mtd/nand/nand_util.c a/drivers/mtd/nand/nand_util.c

drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 renamed from drivers/mtd/nand/nand_util.c 2009-06-14 21:30:39.000000000 +0200 +2 -0
@@ -505,6 +505,8 @@ int nand_write_skip_bad(nand_info_t *nan
                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%08zx\n",
                                offset & ~(nand->erasesize - 1));

drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 int nand_read_skip_bad(nand_info_t *nand · line 584

Quoted 8 lines
drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 renamed from drivers/mtd/nand/nand_util.c 2009-06-14 21:30:39.000000000 +0200 +2 -0
@@ -575,6 +577,8 @@ int nand_read_skip_bad(nand_info_t *nand
                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%08zx\n",
                                offset & ~(nand->erasesize - 1));

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It's like deja vu all over again."                      - Yogi Berra
#2 lore raw

PATCH 1/1 add WATCHDOG_RESET() on nand write and read

Quoted 24 lines · Wolfgang Denk

Dear Scott,

Quoted 21 lines · In message <[email protected]> Giulio Benetti wrote:

I think it's better to put Watchdog reset also inside read and write nand. What do you think?

Signed-off-by giulio.benetti at micronovasrl.com

diff -urpN b/drivers/mtd/nand/nand_util.c a/drivers/mtd/nand/nand_util.c

drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 renamed from drivers/mtd/nand/nand_util.c 2009-06-14 21:30:39.000000000 +0200 +2 -0
@@ -505,6 +505,8 @@ int nand_write_skip_bad(nand_info_t *nan
                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%08zx\n",
                                offset & ~(nand->erasesize - 1));
@@ -575,6 +577,8 @@ int nand_read_skip_bad(nand_info_t *nand
                size_t block_offset = offset & (nand->erasesize - 1);
                size_t read_length;
 
Quoted 7 lines

drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 int nand_read_skip_bad(nand_info_t *nand · line 584

Quoted 5 lines
drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.000000000 +0200 renamed from drivers/mtd/nand/nand_util.c 2009-06-14 21:30:39.000000000 +0200 +2 -0
+               WATCHDOG_RESET ();
+
                if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
                        printf ("Skipping bad block 0x%08zx\n",
                                offset & ~(nand->erasesize - 1));

Applied to u-boot-nand-flash (manually, since I lost the original patch and it's hard to get an applyable patch from the list archives).

-Scott

#3 lore raw

PATCH 1/1 add WATCHDOG_RESET() on nand write and read

Dear Scott Wood,

Quoted 3 lines · In message <[email protected]> you wrote:

Applied to u-boot-nand-flash (manually, since I lost the original patch and it's hard to get an applyable patch from the list archives).

And if anything else fails, just drop me a note :-)

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only perfect science is hind-sight.