public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Davide CASCONE <davide.cascone@st.com>
To: <linux-mtd@lists.infradead.org>
Subject: nandwrite fix
Date: Tue, 18 Jul 2006 13:44:00 +0200	[thread overview]
Message-ID: <000201c6aa5f$7c79f420$253682a4@nap.st.com> (raw)

I have tried to use the nandwrite utility with a large page nand, but it doesn't work properly. The problem is related to the jffs2_oobinfo struct. I have fixed the problem replacing the defined jffs2_oobinfo struct (for small page nand)

struct nand_oobinfo jffs2_oobinfo = {
	.useecc = MTD_NANDECC_PLACE,
	.eccbytes = 6,
	.eccpos = { 0, 1, 2, 3, 6, 7 }
};

with the following struct (for large page nand)

struct nand_oobinfo jffs2_oobinfo = {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 24,
        .eccpos = {
                40, 41, 42, 43, 44, 45, 46, 47,
                48, 49, 50, 51, 52, 53, 54, 55,
                56, 57, 58, 59, 60, 61, 62, 63},
        .oobfree = { {2, 38} }
};

Now the nandwrite utility works properly, but I think it's better to define a macro in order to select the correct jffs2_oobinfo struct depending on the device page size. What do you think about?

Best regards,
Davide

             reply	other threads:[~2006-07-18 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18 11:44 Davide CASCONE [this message]
2006-07-18 12:15 ` nandwrite fix Vitaly Wool

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='000201c6aa5f$7c79f420$253682a4@nap.st.com' \
    --to=davide.cascone@st.com \
    --cc=linux-mtd@lists.infradead.org \
    /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