* [U-Boot] am35xx, twister: could not write nand flash
@ 2012-06-15 12:01 Heiko Schocher
2012-06-15 16:28 ` Scott Wood
0 siblings, 1 reply; 2+ messages in thread
From: Heiko Schocher @ 2012-06-15 12:01 UTC (permalink / raw)
To: u-boot
Hello Scott,
I currently tried current U-Boot HEAD
commit fedab338f3459315cb69627fcf46032ec8df1753
Merge: 74b5b5d f6b690e
Author: Wolfgang Denk <wd@denx.de>
Date: Thu Jun 7 23:42:17 2012 +0200
Merge branch 'master' of git://git.denx.de/u-boot-video
on the twister board, and detected that a "run update" fails with:
twister => run update
SW ECC selected
NAND erase: device 0 offset 0x80000, size 0x100000
Erasing at 0x160000 -- 100% complete.
OK
NAND write:
(board hangs ...)
Environment var:
update=nandecc sw;nand erase ${uboot_addr} 100000;nand write ${loadaddr} ${uboot_addr} 80000
So I started "git bisection":
[hs at pollux u-boot]$ git bisect start
[hs at pollux u-boot]$ git bisect bad
[hs at pollux u-boot]$ git bisect good 415d386877df49eb051b85ef74fa59a16dc17c7d
Bisecting: 211 revisions left to test after this (roughly 8 steps)
[...]
[hs at pollux u-boot]$ git bisect bad
418396e212b59bf907dbccad997ff50f7eb61b16 is the first bad commit
commit 418396e212b59bf907dbccad997ff50f7eb61b16
Author: Scott Wood <scottwood@freescale.com>
Date: Fri Mar 2 14:01:57 2012 -0600
nand: extend .raw accesses to work on multiple pages
A use for this is to read, modify, erase, and write an entire block as a
single unit, as a replacement for the biterr command. This way gives
more flexibility in that you can also test multiple bit errors, errors
in the ECC, etc.
Signed-off-by: Scott Wood <scottwood@freescale.com>
:040000 040000 ad5ce55a0fdf3a40e1aaae0546aae68bf7a0b480 f57e87a8630715e37170b5bb3a109a58b6b89333 M common
:040000 040000 83834ae80a73f20357132875078f643b4064f9dd ed0004e44b4da8b2734168a3950733afba0a0b64 M doc
[hs at pollux u-boot]$
following patch helps:
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index fa44295..edeb093 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -617,7 +617,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
s = strchr(cmd, '.');
- if (!strcmp(s, ".raw")) {
+ if ((s != NULL) && (!strcmp(s, ".raw"))) {
raw = 1;
if (arg_off(argv[3], &dev, &off, &size))
What do you think? Is this a correct fix, and I should sent this as
a real patch, or did I overlook something?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] am35xx, twister: could not write nand flash
2012-06-15 12:01 [U-Boot] am35xx, twister: could not write nand flash Heiko Schocher
@ 2012-06-15 16:28 ` Scott Wood
0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2012-06-15 16:28 UTC (permalink / raw)
To: u-boot
On 06/15/2012 07:01 AM, Heiko Schocher wrote:
> Hello Scott,
>
> I currently tried current U-Boot HEAD
>
> commit fedab338f3459315cb69627fcf46032ec8df1753
> Merge: 74b5b5d f6b690e
> Author: Wolfgang Denk <wd@denx.de>
> Date: Thu Jun 7 23:42:17 2012 +0200
>
> Merge branch 'master' of git://git.denx.de/u-boot-video
>
> on the twister board, and detected that a "run update" fails with:
>
> twister => run update
> SW ECC selected
>
> NAND erase: device 0 offset 0x80000, size 0x100000
> Erasing at 0x160000 -- 100% complete.
> OK
>
> NAND write:
> (board hangs ...)
>
> Environment var:
> update=nandecc sw;nand erase ${uboot_addr} 100000;nand write ${loadaddr}
> ${uboot_addr} 80000
>
> So I started "git bisection":
>
> [hs at pollux u-boot]$ git bisect start
> [hs at pollux u-boot]$ git bisect bad
> [hs at pollux u-boot]$ git bisect good
> 415d386877df49eb051b85ef74fa59a16dc17c7d
> Bisecting: 211 revisions left to test after this (roughly 8 steps)
> [...]
> [hs at pollux u-boot]$ git bisect bad
> 418396e212b59bf907dbccad997ff50f7eb61b16 is the first bad commit
> commit 418396e212b59bf907dbccad997ff50f7eb61b16
> Author: Scott Wood <scottwood@freescale.com>
> Date: Fri Mar 2 14:01:57 2012 -0600
>
> nand: extend .raw accesses to work on multiple pages
>
> A use for this is to read, modify, erase, and write an entire block
> as a
> single unit, as a replacement for the biterr command. This way gives
> more flexibility in that you can also test multiple bit errors, errors
> in the ECC, etc.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
>
> :040000 040000 ad5ce55a0fdf3a40e1aaae0546aae68bf7a0b480
> f57e87a8630715e37170b5bb3a109a58b6b89333 M common
> :040000 040000 83834ae80a73f20357132875078f643b4064f9dd
> ed0004e44b4da8b2734168a3950733afba0a0b64 M doc
> [hs at pollux u-boot]$
>
> following patch helps:
>
> diff --git a/common/cmd_nand.c b/common/cmd_nand.c
> index fa44295..edeb093 100644
> --- a/common/cmd_nand.c
> +++ b/common/cmd_nand.c
> @@ -617,7 +617,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc,
> char * const argv[])
>
> s = strchr(cmd, '.');
>
> - if (!strcmp(s, ".raw")) {
> + if ((s != NULL) && (!strcmp(s, ".raw"))) {
> raw = 1;
>
> if (arg_off(argv[3], &dev, &off, &size))
>
> What do you think? Is this a correct fix, and I should sent this as
> a real patch, or did I overlook something?
This is the correct fix, and I have a pull request pending that contains
it. :-)
-Scott
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-15 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-15 12:01 [U-Boot] am35xx, twister: could not write nand flash Heiko Schocher
2012-06-15 16:28 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox