From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/1] Revert "nand_base: detect more ONFI flash"
Date: Tue, 7 May 2013 22:21:39 +0200 [thread overview]
Message-ID: <1367958099-5063-1-git-send-email-plagnioj@jcrosoft.com> (raw)
this brake the nand support on at91sam9x5ek
where we have a non compliant ONFI nand
NAND device: Manufacturer ID: 0xad, Chip ID: 0xda (Hynix NAND 256MiB 3,3V 8-bit), 256MiB, page size: 2048, OOB size: 64
This reverts commit 4c2bdc8728016b3412523e3264651651fe752860.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
drivers/mtd/nand/nand_base.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index e8103cf..67e913a 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1179,15 +1179,16 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
return ERR_PTR(-ENODEV);
}
- if (!type)
- type = nand_flash_ids;
-
- for (; type->name != NULL; type++)
- if (dev_id == type->id)
+ /* Lookup the flash id */
+ for (i = 0; nand_flash_ids[i].name != NULL; i++) {
+ if (dev_id == nand_flash_ids[i].id) {
+ type = &nand_flash_ids[i];
break;
+ }
+ }
chip->onfi_version = 0;
- if (!type->name || !type->pagesize) {
+ if (!type) {
/* Check is chip is ONFI compliant */
ret = nand_flash_detect_onfi(mtd, chip, &busw);
if (ret)
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2013-05-07 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 20:21 Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-05-08 5:11 ` Sascha Hauer
2013-05-08 7:30 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 16:25 ` Eric Bénard
2013-05-08 16:36 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-15 6:46 ` Re[2]: " Alexander Shiyan
2013-05-15 6:59 ` Sascha Hauer
2013-05-15 7:08 ` Re[2]: " Alexander Shiyan
2013-05-15 7:50 ` Re[3]: " Alexander Shiyan
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=1367958099-5063-1-git-send-email-plagnioj@jcrosoft.com \
--to=plagnioj@jcrosoft.com \
--cc=barebox@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