public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: "Narnakaje, Snehaprabha" <nsnehaprabha@ti.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
	"davinci-linux-open-source@linux.davincidsp.com"
	<davinci-linux-open-source@linux.davincidsp.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH 2.6.30-rc6 3/3] NAND: Add 4-bit ECC support for large page	NAND chips
Date: Wed, 20 May 2009 12:06:32 -0700	[thread overview]
Message-ID: <4A1454B8.3010605@boundarydevices.com> (raw)
In-Reply-To: <7A436F7769CA33409C6B44B358BFFF0C01138180E0@dlee02.ent.ti.com>

Narnakaje, Snehaprabha wrote:
> Troy,
> 
>> -----Original Message-----
>> From: Troy Kisky [mailto:troy.kisky@boundarydevices.com]
>> Sent: Monday, May 18, 2009 8:17 PM
>> To: Narnakaje, Snehaprabha
>> Cc: dwmw2@infradead.org; davinci-linux-open-source@linux.davincidsp.com;
>> linux-mtd@lists.infradead.org; tglx@linutronix.de; akpm@linux-
>> foundation.org
>> Subject: Re: [PATCH 2.6.30-rc6 3/3] NAND: Add 4-bit ECC support for large
>> page NAND chips
>>
>> Troy Kisky wrote:
>>> nsnehaprabha@ti.com wrote:
>>>> From: Sneha Narnakaje <nsnehaprabha@ti.com>
>>>>
>>>> This patch adds 4-bit ECC support for large page NAND chips using the
>> new ECC
>>>> mode NAND_ECC_HW_OOB_FIRST. The platform data from board-dm355-evm has
>> been
>>>> adjusted to use this mode.
>>>>
>>>> The patches have been verified on DM355 device with 2K Micron devices
>> using
>>>> mtd-tests and JFFS2. Error correction upto 4-bits has also been
>> verified using
>>>> nandwrite/nanddump utilities.
>>>>
>>>> Reviewed-by: David Brownell <dbrownell@users.sourceforge.net>
>>>> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>
>>>> ---
>>>>  drivers/mtd/nand/davinci_nand.c |   37
>> +++++++++++++++++++++++++++++++------
>>>>  1 files changed, 31 insertions(+), 6 deletions(-)
>>>>

>>>> diff --git a/drivers/mtd/nand/davinci_nand.c
>> b/drivers/mtd/nand/davinci_nand.c
>>>> index ba6940d..4557b8d 100644
>>>> --- a/drivers/mtd/nand/davinci_nand.c
>>>> +++ b/drivers/mtd/nand/davinci_nand.c
>>>> @@ -500,6 +500,24 @@ static struct nand_ecclayout hwecc4_small
> __initconst = {
>>>>  	},
>>>>  };
>>>>
>>>> +/* An ECC layout for using 4-bit ECC with large-page (2048bytes) flash,
>>>> + * storing ten ECC bytes plus the manufacturer's bad block marker byte,
>>>> + * and not overlapping the default BBT markers.
>>>> + */
>>>> +static struct nand_ecclayout hwecc4_2048 __initconst = {
>>>> +	.eccbytes = 40,
>>>> +	.eccpos = { 0, 1, 2, 3, 4,
>>>> +		/* offset 5 holds the badblock marker */
>> 
>> I don't see any bad block overrides to move it from bytes 0,1
>> to byte 5 in this patch. What am I missing?

> We are making sure we are not overwriting offset 5, that holds the badblock marker from nand manufacturer. Thus offset 5 is skipped in the eccpos.

Yes, I agree, you are. But how does Linux know where to look for the bad block marker?


>>>> @@ -689,15 +707,22 @@ static int __init nand_davinci_probe(struct
>> platform_device *pdev)
>>>>  				info->mtd.oobsize - 16;
>>>>  			goto syndrome_done;
>>>>  		}
>>>> +		if (chunks == 4) {
>>>> +			info->ecclayout = hwecc4_2048;
>>>> +			info->ecclayout.oobfree[1].length =
>>>> +				info->mtd.oobsize - 49;
>> Most drivers set chip->ecc.layout = ... Is it ok to use ecclayout
>> instead?????
> 
> info->ecclayout is internal to davinci nand driver, since info is of type 'struct davinci_nand_info'.
> 
> In the davinci_nand.c source, there is already code to assign info->ecclayout to chip->ecc.layout.
> 
> syndrome_done:
>                 info->chip.ecc.layout = &info->ecclayout;
> 
> We have this internal structure to handle different ecc modes (ecc bits vs. page sizes).
> 
> Thanks
> Sneha

Ok, this is on top of previous patches not yet accepted. I missed that.



Troy

  reply	other threads:[~2009-05-20 19:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18 21:38 [PATCH 2.6.30-rc6 3/3] NAND: Add 4-bit ECC support for large page NAND chips nsnehaprabha
2009-05-18 23:57 ` Troy Kisky
2009-05-19  0:17   ` Troy Kisky
2009-05-20 14:11     ` Narnakaje, Snehaprabha
2009-05-20 19:06       ` Troy Kisky [this message]
2009-05-20 19:18         ` Narnakaje, Snehaprabha
2009-05-20 20:18           ` Troy Kisky
2009-05-20 20:49             ` Narnakaje, Snehaprabha
2009-05-21  0:23               ` Troy Kisky
2009-05-20 14:06   ` Narnakaje, Snehaprabha
2009-05-21  0:38 ` David Brownell
2009-05-23  3:51   ` Narnakaje, Snehaprabha

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=4A1454B8.3010605@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=akpm@linux-foundation.org \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nsnehaprabha@ti.com \
    --cc=tglx@linutronix.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