From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtd: nand: mxs: Add support for multiple NAND chips
Date: Tue, 09 Dec 2014 08:20:51 +0100 [thread overview]
Message-ID: <5486A2D3.6070001@denx.de> (raw)
In-Reply-To: <1418079182.5581.12.camel@freescale.com>
On 08.12.2014 23:53, Scott Wood wrote:
>>>>>>> => nand device
>>>>>>>
>>>>>>> Device 0: 2x nand0, sector size 128 KiB
>>>>>>>
>>>>>>> Page size 2048 b
>>>>>>> OOB size 64 b
>>>>>>> Erase size 131072 b
>>>>>>
>>>>>> Shouldn't you see "Device 0" and "Device 1" ?
>>>>>
>>>>> The "2x" indicates that there are two identical chips being treated as
>>>>> a single device (chip->numchips).
>>>>
>>>> Is that correct ? What if I have two different NAND chips on this
>>>> controller?
>>>
>>> Then they need to be represented as separate NAND devices, rather than
>>> multiple chips on one device.
>>
>> Gee, I wouldn't have though of that, really ;-)
>
> Well, you asked a vague question...
>
>> So is this patch correct or not ?
>
> In all its details? I don't know, as I'm not familiar with the
> hardware. With regards to the question about non-identical devices,
> this patch doesn't add support for that. So it's a question of what the
> requirements are, and whether it's being used in the right
> circumstances. If you have non-identical NAND chips, make sure
> CONFIG_SYS_NAND_MAX_CHIPS is 1.
Correct. Using CONFIG_SYS_NAND_MAX_CHIPS support identical chips. This
is exactly what I need in my case. And is also needed for NAND devices
that have multiple NAND chips embedded on one die. You then need this
possibility to support multiple chips. Otherwise not the whole device
can be accessed.
> A better question might be, does this approach make sense, versus
> implementing support for multiple devices? What does Linux support?
Linux does it exactly in the same way:
[ 1.089439] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
[ 1.095864] nand: Micron MT29F4G08ABADAH4
[ 1.099896] nand: 512MiB, SLC, page size: 2048, OOB size: 64
[ 1.105871] nand: 2 chips detected
...
And exposes those 2 chips as one NAND device. By using this patch we
also use the same MTD partitioning in U-Boot and Linux (mtdparts
environment).
I hope now all is clear.
Thanks,
Stefan
next prev parent reply other threads:[~2014-12-09 7:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-02 13:26 [U-Boot] [PATCH] mtd: nand: mxs: Add support for multiple NAND chips Stefan Roese
2014-12-06 13:07 ` Marek Vasut
2014-12-06 23:45 ` Scott Wood
2014-12-07 1:32 ` Marek Vasut
2014-12-07 1:50 ` Scott Wood
2014-12-07 5:26 ` Marek Vasut
2014-12-08 22:53 ` Scott Wood
2014-12-09 7:20 ` Stefan Roese [this message]
2014-12-09 7:34 ` Marek Vasut
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=5486A2D3.6070001@denx.de \
--to=sr@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox