From: "Brian Norris" <norris@broadcom.com>
To: "Michael Guntsche" <mike@it-loops.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] Nand support broken with v2.6.36-rc1
Date: Tue, 17 Aug 2010 11:49:38 -0700 [thread overview]
Message-ID: <4C6AD9C2.1070705@broadcom.com> (raw)
In-Reply-To: <20100817174704.GA1322@gibson.comsick.at>
Hi,
On 08/17/2010 10:47 AM, Michael Guntsche wrote:
> First, I am just an end user so I have no access to the datasheets etc. I
> just got the code from the board manufactrurer (2.6.27) and forward
> port it to recent kernels.
I see. No problem. We'll work with what you can do:
If you can simply find the NAND chip part number (it would be printed on
the chip itself), that will be helpful.
Also, there are a few things you can do under a working kernel (e.g.,
2.6.35?).
First, have you ever used any of the mtdutils? In particular, running
the command "mtdinfo -a" and sending the output is helpful if you have
the utility installed on your board.
Second, since you are doing the forward-porting, I assume you can do a
little bit of coding/patching. To print the whole ID string, you can add
a simple "printk" line to the code in "drivers/mtd/nand/nand_base.c".
For example, on the 2.6.35 kernel, you can just apply the patch below.
Then, on boot, the ID string will print (or at least show up in "dmesg"
or "syslog"). That info can help a little.
> The reason I am using a specific layout is because the bootloader on
> this board expects it this way. It formats it this way in the beginning
> and I cannot change that.
Well, if the new commit that broke your board is getting the block
marker *correct* according to the factory specifications, then this
particular problem is your setup's problem; perhaps there could be a
workaround, like I mentioned about checking for these kind of conflicts.
However, I'm still hypothesizing that I simply got the detection wrong,
and so my fix will solve your problem.
Thanks,
Brian
---
drivers/mtd/nand/nand_base.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 4a7b864..d2d1fab 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2809,8 +2809,10 @@ static struct nand_flash_dev
*nand_get_flash_type(struct mtd_info *mtd,
/* Read entire ID string */
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 8; i++) {
id_data[i] = chip->read_byte(mtd);
+ printk(KERN_INFO "ID byte %i: %#x\n", i, id_data[i]);
+ }
if (id_data[0] != *maf_id || id_data[1] != dev_id) {
printk(KERN_INFO "%s: second ID read did not match "
--
1.7.0.4
next prev parent reply other threads:[~2010-08-17 18:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 11:36 [BUG] Nand support broken with v2.6.36-rc1 Michael Guntsche
2010-08-17 17:00 ` Brian Norris
2010-08-17 17:47 ` Michael Guntsche
2010-08-17 18:49 ` Brian Norris [this message]
2010-08-17 20:06 ` Michael Guntsche
2010-08-17 21:42 ` Brian Norris
2010-08-18 5:53 ` Michael Guntsche
2010-08-17 20:59 ` Abdoulaye Walsimou GAYE
2010-08-17 22:07 ` Brian Norris
2010-08-18 18:25 ` [PATCH] mtd: nand: Fix regression in BBM detection Brian Norris
2010-08-18 19:30 ` Abdoulaye Walsimou GAYE
2010-08-19 0:04 ` Brian Norris
-- strict thread matches above, loose matches on Subject: below --
2010-08-17 8:52 [BUG] Nand support broken with v2.6.36-rc1 Michael Guntsche
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=4C6AD9C2.1070705@broadcom.com \
--to=norris@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=mike@it-loops.com \
/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;
as well as URLs for NNTP newsgroup(s).