From: Hans de Goede <hdegoede@redhat.com>
To: boris.brezillon@free-electrons.com,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
linux-mtd@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Roy Spliet <r.spliet@ultimaker.com>,
Richard Weinberger <richard@nod.at>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
linux-sunxi@googlegroups.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [linux-sunxi] [RFC PATCH 0/6] mtd: nand: per-partition ECC config
Date: Fri, 14 Aug 2015 15:05:21 +0200 [thread overview]
Message-ID: <55CDE791.8030306@redhat.com> (raw)
In-Reply-To: <1438264225-23796-1-git-send-email-boris.brezillon@free-electrons.com>
Hi all,
On 30-07-15 15:50, Boris Brezillon wrote:
> Hello,
>
> It's been a year and a half since I posted my first series proposing
> an approach to support per-partition ECC config [1].
>
> First of all, before describing what's done in this patch series, I'd
> like to sum-up why this is needed, and why a generic approach is
> preferred over a NAND controller specific one.
> On one side we have a lot of NAND chips out there and they all have
> their own requirements in term of ECC strength and step size. On the
> other side, most SoCs support booting from NAND (they embed a simple
> logic in the ROM code to access a NAND chip through their NAND
> controller).
> In a ideal world all NAND chips would use the ONFI or JEDEC standard
> exposing their requirements in a standard way, and the SoC vendors
> would put the ONFI and JEDEC detection code in their ROM code and use
> it to properly configure their NAND controller.
> But we're not leaving in an ideal world, and some SoC vendors have
> decided to hardcode (or use a simplified logic) to select the ECC
> controller config. And in the case where the NAND requirement does
> not match the ROM code config, you only have two solutions:
>
> 1/ leave with the unsuitable ECC config for the whole chip
> 2/ isolate the portion of NAND read by the ROM code into a sperate
> partition and use a suitable ECC config for the rest of the
> NAND
>
> IMHO the second solution is far better than the first one, but it
> requires some adjustments in the mtdpart and NAND code layer to be
> applicable.
>
> Now, why should we prefer a generic approach over a NAND controller/SoC
> specific one ?
> Because, this seems to be a problem faced by other people on other
> platform than the sunxi one. Moreover, the ECC config is not the only
> thing we'd have to tweak per partition: I'm currently working on the
> NAND randomizer/scrambler aspect (required to support some MLC chips),
> and this is also something the ROM code configure differently to
> boot the first stage bootloader.
> For all these reasons, I think providing a generic infrastructure allowing
> specific implementation to tweak their behavior is better than hardcoding
> it somewhere in the NAND controller driver.
>
> This series proposes a solution to allow such per-partition config by
> first letting MTD implementations (or subframework) overload the MTD
> partition functions (patches 1 and 2), and then providing the appropriate
> modifications in the NAND layer to support per-partition ECC config
> (patches 3 to 5).
> The last patch is showing how a NAND controller can add support for
> per-partition ECC config.
>
> Note that I tried to keep the changes as less invasive as impossible, but
> I might have missed some aspects.
> Any suggestions are welcome.
>
> Best Regards,
>
> Boris
Thanks for doing this, this series looks good to me.
MTD maintainers, what do we need to do to get this upstream, submit
a non RFC version ? Or ... ?
Regards,
Hans
WARNING: multiple messages have this Message-ID (diff)
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] [RFC PATCH 0/6] mtd: nand: per-partition ECC config
Date: Fri, 14 Aug 2015 15:05:21 +0200 [thread overview]
Message-ID: <55CDE791.8030306@redhat.com> (raw)
In-Reply-To: <1438264225-23796-1-git-send-email-boris.brezillon@free-electrons.com>
Hi all,
On 30-07-15 15:50, Boris Brezillon wrote:
> Hello,
>
> It's been a year and a half since I posted my first series proposing
> an approach to support per-partition ECC config [1].
>
> First of all, before describing what's done in this patch series, I'd
> like to sum-up why this is needed, and why a generic approach is
> preferred over a NAND controller specific one.
> On one side we have a lot of NAND chips out there and they all have
> their own requirements in term of ECC strength and step size. On the
> other side, most SoCs support booting from NAND (they embed a simple
> logic in the ROM code to access a NAND chip through their NAND
> controller).
> In a ideal world all NAND chips would use the ONFI or JEDEC standard
> exposing their requirements in a standard way, and the SoC vendors
> would put the ONFI and JEDEC detection code in their ROM code and use
> it to properly configure their NAND controller.
> But we're not leaving in an ideal world, and some SoC vendors have
> decided to hardcode (or use a simplified logic) to select the ECC
> controller config. And in the case where the NAND requirement does
> not match the ROM code config, you only have two solutions:
>
> 1/ leave with the unsuitable ECC config for the whole chip
> 2/ isolate the portion of NAND read by the ROM code into a sperate
> partition and use a suitable ECC config for the rest of the
> NAND
>
> IMHO the second solution is far better than the first one, but it
> requires some adjustments in the mtdpart and NAND code layer to be
> applicable.
>
> Now, why should we prefer a generic approach over a NAND controller/SoC
> specific one ?
> Because, this seems to be a problem faced by other people on other
> platform than the sunxi one. Moreover, the ECC config is not the only
> thing we'd have to tweak per partition: I'm currently working on the
> NAND randomizer/scrambler aspect (required to support some MLC chips),
> and this is also something the ROM code configure differently to
> boot the first stage bootloader.
> For all these reasons, I think providing a generic infrastructure allowing
> specific implementation to tweak their behavior is better than hardcoding
> it somewhere in the NAND controller driver.
>
> This series proposes a solution to allow such per-partition config by
> first letting MTD implementations (or subframework) overload the MTD
> partition functions (patches 1 and 2), and then providing the appropriate
> modifications in the NAND layer to support per-partition ECC config
> (patches 3 to 5).
> The last patch is showing how a NAND controller can add support for
> per-partition ECC config.
>
> Note that I tried to keep the changes as less invasive as impossible, but
> I might have missed some aspects.
> Any suggestions are welcome.
>
> Best Regards,
>
> Boris
Thanks for doing this, this series looks good to me.
MTD maintainers, what do we need to do to get this upstream, submit
a non RFC version ? Or ... ?
Regards,
Hans
next prev parent reply other threads:[~2015-08-14 13:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 13:50 [RFC PATCH 0/6] mtd: nand: per-partition ECC config Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-07-30 13:50 ` [RFC PATCH 1/6] mtd: allow device-specific partition handling Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-07-30 13:50 ` [RFC PATCH 2/6] mtd: part: pass OF node to the MTD partition layer Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-07-30 13:50 ` [RFC PATCH 3/6] mtd: nand: move nand_ecc_ctrl initialization out of nand_scan_tail Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-07-30 13:50 ` [RFC PATCH 4/6] mtd: nand: add an helper to access the ecc controller struct Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-07-30 13:50 ` [RFC PATCH 5/6] mtd: nand: add infrastructure for per-partition ECC config Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-07-30 13:50 ` [RFC PATCH 6/6] mtd: nand: sunxi: support " Boris Brezillon
2015-07-30 13:50 ` Boris Brezillon
2015-08-14 13:05 ` Hans de Goede [this message]
2015-08-14 13:05 ` [linux-sunxi] [RFC PATCH 0/6] mtd: nand: " Hans de Goede
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=55CDE791.8030306@redhat.com \
--to=hdegoede@redhat.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-sunxi@googlegroups.com \
--cc=maxime.ripard@free-electrons.com \
--cc=r.spliet@ultimaker.com \
--cc=richard@nod.at \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.