From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] am35xx, twister: could not write nand flash
Date: Fri, 15 Jun 2012 11:28:30 -0500 [thread overview]
Message-ID: <4FDB62AE.80606@freescale.com> (raw)
In-Reply-To: <4FDB2416.2060809@denx.de>
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
prev parent reply other threads:[~2012-06-15 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 12:01 [U-Boot] am35xx, twister: could not write nand flash Heiko Schocher
2012-06-15 16:28 ` Scott Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FDB62AE.80606@freescale.com \
--to=scottwood@freescale.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.