From: Vipin Kumar <vipin.kumar@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] NAND onfi detection
Date: Tue, 19 Jul 2011 12:01:58 +0530 [thread overview]
Message-ID: <4E2524DE.7050709@st.com> (raw)
Hello Scott,
The present handling of ONFI devices requires that the device id to be put in
"nand_flash_ids" table. I am pasting the code below to ease the discussion
In case the dev_id doesn't match with the one's present in the table type->name
points to null and an error -ENODEV is returned. detect onfi is never called
if (!type)
type = nand_flash_ids;
for (; type->name != NULL; type++)
if (*dev_id == type->id)
break;
if (!type->name) {
/* supress warning if there is no nand */
if (*maf_id != 0x00 && *maf_id != 0xff &&
*dev_id != 0x00 && *dev_id != 0xff)
printk(KERN_INFO "%s: unknown NAND device: "
"Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n",
__func__, *maf_id, *dev_id);
return ERR_PTR(-ENODEV);
}
if (!mtd->name)
mtd->name = type->name;
chip->chipsize = (uint64_t)type->chipsize << 20;
chip->onfi_version = 0;
ret = nand_flash_detect_onfi(mtd, chip, &busw);
if (!ret)
nand_flash_detect_non_onfi(mtd, chip, type, &busw);
Is the behavior expected ?
Am I missing something
Regards
Vipin
next reply other threads:[~2011-07-19 6:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 6:31 Vipin Kumar [this message]
2011-07-19 18:38 ` [U-Boot] NAND onfi detection Scott Wood
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=4E2524DE.7050709@st.com \
--to=vipin.kumar@st.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.