From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org
Subject: Re: [PATCH RFC] Alphascale ASM9260 NAND controller driver
Date: Wed, 17 Dec 2014 16:01:42 +0100 [thread overview]
Message-ID: <20141217160142.652da57f@bbrezillon> (raw)
In-Reply-To: <54919501.3020100@rempel-privat.de>
On Wed, 17 Dec 2014 15:36:49 +0100
Oleksij Rempel <linux@rempel-privat.de> wrote:
> Am 17.12.2014 um 14:24 schrieb Boris Brezillon:
> > Hi Oleksij,
> >
> > On Wed, 17 Dec 2014 12:45:17 +0100
> > Oleksij Rempel <linux@rempel-privat.de> wrote:
> >
> >> I collected some questions with this driver. It will be great if you
> >> can help me:
> >> * Do HW_ECC driver should provideo option for SW_ECC?
> >
> > This is not mandatory. I did it in the sunxi driver for testing
> > purpose, but it should work fine without it.
> >
> >> * My HW do ECC correction for n-bits per 512B, it mean it will
> >> split block in 512B parts. If one of part has uncorrectable error, complete block will be
> >> reported as failed. Are there any way for partial recovery?
> >
> > I think what you're calling block here is actually a page.
> > Regarding your question, there is no way to recover part of a page, but
> > each ECC block should be tested and max_bitflip should be returned
> > (even if some ECC blocks contains too many errors to be corrected).
> > Take a look at [1] for an example.
>
> From Flash point of view block or part which i mean != page. In my case
> it is TOSHIBA TC58NVG0S3ETA00, organized as (2048 + 64) bytes × 64 pages
> × 1024blocks. The NFC will split each each 2048B page to 512B
> blocks/???/parts/sub_page/ecc_step/better_name.
Okay, so let's call it ECC step or ECC block, not just block, cause a
NAND block is containing several NAND pages.
>
> HW_ECC provide bit_flip counter for each sub_page. If all sub_pages are
> recovered, there is no problem. Beside the question, how many bit should
> be counted. Right now max_bitflips = sum(all_sub_pages).
Then you should change it to return
max(nbitflips_on_chunk1, nbitflips_on_chunk2, ...)
>
> Second problem which i have is that, there is only one ecc_error flag
> for all sub_pages. If one sub_page filed, i don't know which one. Ecc
> erroc counter register can't help here. Only way is to reread complete
> page with SW_ECC.
Then I don't have any solution right now (I'll think about it)...
>
> >> * This HW reports count of ECC bitflips for each part. Do i need to return count of errors on
> >> all parts for one block?
> >
> > Again: block == page, and no, you should only return the maximum
> > corrected bitflips (same example [1]).
> >
> >
> >> * If HW_ECC different stranges, how it should be configured? With DT or automatically
> >> calculated?
> >
> > I don't get that one...
> > Are you talking about ECC requirements (ECC strength and steps) ?
>
> Yes. Well, i can't choice ECC step(it is 512B on this HW), only strange.
You mean strength :-), then you should either use the values returned
by ONFI or the one defined in the strength_ds and step_ds fields.
DT porperties should override those definitions (for example to force
ECC strength based on a specific bootloader config).
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2014-12-17 15:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 11:45 [PATCH RFC] Alphascale ASM9260 NAND controller driver Oleksij Rempel
2014-12-17 11:45 ` [PATCH RFC] mtd: nand: add asm9260 NFC driver Oleksij Rempel
2014-12-17 16:15 ` Boris Brezillon
2014-12-30 18:09 ` [PATCH RFC v2] " Oleksij Rempel
2014-12-30 19:09 ` Boris Brezillon
2014-12-31 12:58 ` [PATCH v3 1/3] " Oleksij Rempel
2014-12-31 12:58 ` Oleksij Rempel
2014-12-31 12:58 ` [PATCH v3 2/3] mtd: nand: add asm9260-nand devicetree documentation Oleksij Rempel
2014-12-31 17:01 ` Boris Brezillon
2014-12-31 12:58 ` [PATCH v3 3/3] mtd: nand: add Toshiba TC58NVG0S3E to nand_ids table Oleksij Rempel
2014-12-31 16:55 ` Boris Brezillon
2015-08-25 19:25 ` Brian Norris
2015-08-26 4:00 ` Oleksij Rempel
2015-09-01 21:29 ` Brian Norris
2014-12-31 16:48 ` [PATCH v3 1/3] mtd: nand: add asm9260 NFC driver Boris Brezillon
2014-12-31 17:26 ` Boris Brezillon
2015-01-01 20:18 ` Oleksij Rempel
2015-01-01 21:03 ` Boris Brezillon
2015-01-01 12:58 ` Boris Brezillon
2015-01-01 21:14 ` Boris Brezillon
2014-12-17 13:24 ` [PATCH RFC] Alphascale ASM9260 NAND controller driver Boris Brezillon
2014-12-17 14:36 ` Oleksij Rempel
2014-12-17 15:01 ` Oleksij Rempel
2014-12-17 15:01 ` Boris Brezillon [this message]
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=20141217160142.652da57f@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@rempel-privat.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;
as well as URLs for NNTP newsgroup(s).