linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Raphael Pereira <raphaelpereira@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Suport for gf_len 14 in gpmi-nand for i.MX23 using Software BCH ECC
Date: Sat, 4 Aug 2018 11:55:55 +0200	[thread overview]
Message-ID: <20180804115555.667b3fb8@xps13> (raw)
In-Reply-To: <CAAN9NvdvscL1MOKTXuH=Esf0NjC__QVH745n-h3R_hFfeqT9jw@mail.gmail.com>

Hi Raphael,

Raphael Pereira <raphaelpereira@gmail.com> wrote on Wed, 1 Aug 2018
18:29:32 -0300:

> Hi,
> 
> I would like to know if it is possible to use the Software BCH ECC
> implementation to support a GF14 (ECC size == 1024) 40 bit ECC strengh
> flash (MT29F32G08CBADA) on a GF13 (ECC size == 512) 20 bit ECC strengh
> only i.MX23 processor.

I am not sure to understand correctly your request. What do you mean
by "GF13 only i.MX23 processor"? I suppose you refer to the raw NAND
controller abilities? If yes, then why do you care if you use soft
BCH?

And the ECC requirements is just an indication in terms of
correctability, how is 40 bits per 1024 bytes different than 20 bits
per 512?

> 
> I know this processor uses gpmi-nand driver and it seems this driver
> doesn't support software ECC implementation.

Maybe I'm missing something but as the driver supports raw
reads/writes, I don't see why it would not support soft ECC. Boris,
Richard, any thoughts about that?

> What I want to know is if
> it is possible to change the driver to use the current Software BCH
> ECC implementation available on Linux when it detects the
> configuration above which is not hardware supported and switch it to a
> software implementation.

You can use DT properties for that (nand-ecc-mode = "soft";). Otherwise
if the driver effectively does not support the proposed layout at all,
it should just fail to probe.

> Considering most flashes has a 1-bit ECC on
> block 0 that would allow me to boot then switch to software ECC after
> kernel load.
> 
> Best Regards,

Thanks,
Miquèl

  reply	other threads:[~2018-08-04  9:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 21:29 Suport for gf_len 14 in gpmi-nand for i.MX23 using Software BCH ECC Raphael Pereira
2018-08-04  9:55 ` Miquel Raynal [this message]
2018-08-04 11:22   ` Raphael Pereira
2018-08-04 17:33     ` Miquel Raynal
2018-08-05  0:39       ` Raphael Pereira
2018-08-05  8:57         ` Boris Brezillon
2018-08-05  9:13     ` Boris Brezillon
2018-08-05 15:34       ` Raphael Pereira
2018-08-05 15:09   ` Boris Brezillon

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=20180804115555.667b3fb8@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=raphaelpereira@gmail.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).