public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Derek Ou <derek@siconix.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] nand sector size is zero in jffs2 cmds
Date: Mon, 22 Dec 2008 18:02:28 -0700	[thread overview]
Message-ID: <495038A4.5000509@siconix.com> (raw)

Hi, all,

When I tested jffs2 command for NAND, I found that jffs2_1pass.c:: 
jffs2_1pass_build_lists() fails at
    u32 nr_sectors = part->size/part->sector_size;
because part->sector_size is zero.  And cause the "### ERROR ### Please 
RESET the board ###" error when entering the for loop (i < nr_sectors), 
I think.

It looks like the sector_size was not updated in mtdparts_init().  
According to cmd_jffs2.c, the mtdparts_init in the #ifdef 
CONFIG_JFFS2_CMDLINE section calls the parse_mtdparts() and eventually 
reach the following lines in part_validate_nand():
    nand = &nand_info[id->num];
    part->sector_size = nand->erasesize;
However, the other mtdparts_init(), which is not in the #ifdef 
CONFIG_JFFS2_CMDLINE section, does not call parse_mtdparts() and it may 
lead to the part->sector_size not initialized.

I am not totally familiar with this jffs2 and nand code.  Can someone 
review this?  Thanks.
Derek

             reply	other threads:[~2008-12-23  1:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23  1:02 Derek Ou [this message]
2008-12-23 21:44 ` [U-Boot] nand sector size is zero in jffs2 cmds Derek Ou
2009-01-24  0:53   ` Wolfgang Denk
2009-01-26 18:18     ` Derek Ou
2009-01-27 21:01       ` Wolfgang Denk
2009-01-06 19:03 ` [U-Boot] env_nand malloc not released Derek Ou
2009-01-07 22:15   ` Scott Wood
2009-01-24  0:53   ` Wolfgang Denk

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=495038A4.5000509@siconix.com \
    --to=derek@siconix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox