From: Sascha Hauer <s.hauer@pengutronix.de>
To: raespi <raespi@icid.cu>
Cc: barebox@lists.infradead.org
Subject: Re: problem booting with Micron MT29F8G08ABABAWP ...
Date: Mon, 17 Mar 2014 07:39:04 +0100 [thread overview]
Message-ID: <20140317063904.GC17250@pengutronix.de> (raw)
In-Reply-To: <53234E31.2070300@icid.cu>
On Fri, Mar 14, 2014 at 02:45:05PM -0400, raespi wrote:
> Hello again ... diving through the drivers/mtd/nand/nand_base.c code
> I managed to boot with this little modification in the
> nand_flash_detect_onfi() function just before exiting from it:
>
> if ( mtd->oobsize > 128 )
> mtd->oobsize = 128;
>
> Apparently the only allowed oobsizes are 8, 16, 64 and 128 according
> to the nand_scan_ident() function.
You're probably referring to this code:
/*
* If no default placement scheme is given, select an
* appropriate one.
*/
if (!chip->ecc.layout && (chip->ecc.mode != NAND_ECC_SOFT_BCH)) {
switch (mtd->oobsize) {
case 8:
chip->ecc.layout = &nand_oob_8;
break;
case 16:
chip->ecc.layout = &nand_oob_16;
break;
case 64:
chip->ecc.layout = &nand_oob_64;
break;
case 128:
chip->ecc.layout = &nand_oob_128;
break;
default:
pr_warn("No oob scheme defined for oobsize %d\n",
mtd->oobsize);
BUG();
}
}
This check is only executed when you haven't specified an ecc layout in
your chip driver. You probably have to set chip->ecc.layout in your
driver.
For problems like this it often helps to compare it to the kernel code
(provided it works there). The code is quite similar.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2014-03-17 6:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 19:32 problem booting with Micron MT29F8G08ABABAWP raespi
2014-03-13 20:28 ` Eric Bénard
2014-03-14 18:45 ` raespi
2014-03-14 20:18 ` Eric Bénard
2014-03-14 20:30 ` raespi
2014-03-17 6:39 ` Sascha Hauer [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=20140317063904.GC17250@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=raespi@icid.cu \
/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.