From: Jan Glauber <jan.glauber@caviumnetworks.com>
To: <linux-mtd@lists.infradead.org>
Subject: Question about nand_scan()
Date: Fri, 23 Sep 2016 13:29:44 +0200 [thread overview]
Message-ID: <20160923112944.GB4580@hardcore> (raw)
Hi all,
I'm working on a driver for the NAND controller on Cavium's ThunderX.
So far I implemented the low-level functions for using the controller
to access a NAND chip. I can read the ONFI ID and parameter page
with that.
Now I wanted to use nand_scan() instead of manually reading the chip
parameters, but it fails with "No NAND device found".
The hardware I'm using has one NAND device wired as chip 1 (the NAND
controller support chips 0..7).
The reason for the failure seems to be that nand_get_flash_type()
returns an error before all the chips are scanned. What I don't
understand is in that function chip 0 is selected before the loop
that would scan all chips:
/* Select the device */
chip->select_chip(mtd, 0);
My select_chip() stores the chip number (in that case 0) and uses
that for subsequent commands to the controller. Since there is no
chip 0 the read returns nothing and nand_scan() fails.
Probably I'm missing something, would be great if someone could
help me...
thanks,
Jan
next reply other threads:[~2016-09-23 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 11:29 Jan Glauber [this message]
2016-09-23 11:43 ` Question about nand_scan() Boris Brezillon
2016-09-23 12:25 ` Jan Glauber
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=20160923112944.GB4580@hardcore \
--to=jan.glauber@caviumnetworks.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 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.