From: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
To: "\"Qi Wang 王起 (qiwang)\"" <qiwang@micron.com>,
"Brian Norris" <computersforpeace@gmail.com>,
"abrestic@chromium.org" <abrestic@chromium.org>,
"ionela.voinescu@imgtec.com" <ionela.voinescu@imgtec.com>,
"James Hartley" <james.hartley@imgtec.com>,
"arnaud.mouiche@invoxia.com" <arnaud.mouiche@invoxia.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Cc: "\"Frank Liu 刘群 (frankliu)\"" <frankliu@micron.com>,
"\"Peter Pan 潘栋 (peterpandong)\"" <peterpandong@micron.com>
Subject: Re: [PATCH 6/6] mtd: spi-nand: Support common SPI NAND devices
Date: Wed, 3 Dec 2014 08:13:46 -0300 [thread overview]
Message-ID: <547EF06A.4020706@imgtec.com> (raw)
In-Reply-To: <71CF8D7F32C5C24C9CD1D0E02D52498A77136EBD@NTXXIAMBX02.xacn.micron.com>
On 12/03/2014 06:52 AM, Qi Wang 王起 (qiwang) wrote:
>> +
>> +static struct nand_ecclayout ecc_layout_gd5f = {
>> + .eccbytes = 128,
>> + .eccpos = {
>> + 128, 129, 130, 131, 132, 133, 134, 135,
>> + 136, 137, 138, 139, 140, 141, 142, 143,
>> + 144, 145, 146, 147, 148, 149, 150, 151,
>> + 152, 153, 154, 155, 156, 157, 158, 159,
>> + 160, 161, 162, 163, 164, 165, 166, 167,
>> + 168, 169, 170, 171, 172, 173, 174, 175,
>> + 176, 177, 178, 179, 180, 181, 182, 183,
>> + 184, 185, 186, 187, 188, 189, 190, 191,
>> + 192, 193, 194, 195, 196, 197, 198, 199,
>> + 200, 201, 202, 203, 204, 205, 206, 207,
>> + 208, 209, 210, 211, 212, 213, 214, 215,
>> + 216, 217, 218, 219, 220, 221, 222, 223,
>> + 224, 225, 226, 227, 228, 229, 230, 231,
>> + 232, 233, 234, 235, 236, 237, 238, 239,
>> + 240, 241, 242, 243, 244, 245, 246, 247,
>> + 248, 249, 250, 251, 252, 253, 254, 255
>> + },
>> + .oobfree = { {1, 127} }
>> +};
>> +
>> +static struct nand_ecclayout ecc_layout_mt29f = {
>> + .eccbytes = 32,
>> + .eccpos = {
>> + 8, 9, 10, 11, 12, 13, 14, 15,
>> + 24, 25, 26, 27, 28, 29, 30, 31,
>> + 40, 41, 42, 43, 44, 45, 46, 47,
>> + 56, 57, 58, 59, 60, 61, 62, 63,
>> + },
>> +};
>> +
>
> As they are using On die ecc, oob layout definition is defined by SPI NAND vendors.
> Part of oob is protected by ecc, and the rest is unprotect.
> I am thinking if we can define a variable to indicate the range, what is protect,
> and what is unprotect.
Yes, we should add the free out-of-band regions.
> This would be very useful for filesystem, which want to write data into OOB.
>
> For example, Jffs2 program clean marker data to oob first when format operation,
> then will program main data into NAND flash main area when normal write operation.
> That mean JFFS2 can only store clean marker into unprotect area of oob.
Yeah, but are these devices capable of writing to the OOB region only
(without messing with the data) ?
If I understand this correctly, supporting JFFS2 would mean implementing
a sort of read-modify-write operation to be able to write the OOB
without touching the main area, and viceversa.
I'd say JFFS2 is not the target filesystem for these SPI NAND devices,
and UBI-based filesystems should be used instead (UBI don't use OOB).
> But for YAFFS2, it program main data and spare area data together into NAND flash, then
> YAFFS2 can store data into protect area of OOB.
Well, frankly, I'm not too worried about YAFFS2. It was never mainlined,
and probably it will never be.
Do you have any reason for *not* using a UBI-based FS?
--
Ezequiel
next prev parent reply other threads:[~2014-12-03 11:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 9:52 [PATCH 6/6] mtd: spi-nand: Support common SPI NAND devices Qi Wang 王起 (qiwang)
2014-12-03 11:13 ` Ezequiel Garcia [this message]
2014-12-03 12:08 ` Qi Wang 王起 (qiwang)
2014-12-03 20:18 ` Ezequiel Garcia
-- strict thread matches above, loose matches on Subject: below --
2014-12-02 12:58 [PATCH 0/6] SPI NAND for everyone Ezequiel Garcia
2014-12-02 12:58 ` [PATCH 6/6] mtd: spi-nand: Support common SPI NAND devices Ezequiel Garcia
2014-12-13 1:27 ` Daniel Ehrenberg
2014-12-15 19:36 ` Ezequiel Garcia
2014-12-15 20:17 ` Daniel Ehrenberg
[not found] ` <87F60714EC601C4C83DFF1D2E3D390A049EE65@NTXXIAMBX02.xacn.micron.com>
2014-12-22 4:34 ` Qi Wang 王起 (qiwang)
2014-12-22 16:16 ` Ezequiel Garcia
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=547EF06A.4020706@imgtec.com \
--to=ezequiel.garcia@imgtec.com \
--cc=abrestic@chromium.org \
--cc=arnaud.mouiche@invoxia.com \
--cc=computersforpeace@gmail.com \
--cc=frankliu@micron.com \
--cc=ionela.voinescu@imgtec.com \
--cc=james.hartley@imgtec.com \
--cc=linux-mtd@lists.infradead.org \
--cc=peterpandong@micron.com \
--cc=qiwang@micron.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).