From: Felipe Balbi <balbi@ti.com>
To: "Gupta, Pekon" <pekon@ti.com>
Cc: "computersforpeace@gmail.com" <computersforpeace@gmail.com>,
"dwmw2@infradead.org" <dwmw2@infradead.org>,
"dedekind1@gmail.com" <dedekind1@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>, Pawel Moll <Pawel.Moll@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"tony@atomide.com" <tony@atomide.com>,
"avinashphilipk@gmail.com" <avinashphilipk@gmail.com>,
"Balbi, Felipe" <balbi@ti.com>,
"robherring2@gmail.com" <robherring2@gmail.com>,
"bcousson@baylibre.com" <bcousson@baylibre.com>,
"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
"olof@lixom.net" <olof@lixom.net>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v7 1/6] mtd: nand: omap: combine different flavours of 1-bit hamming ecc schemes
Date: Fri, 11 Oct 2013 06:53:27 -0500 [thread overview]
Message-ID: <20131011115327.GA25706@radagast> (raw)
In-Reply-To: <20980858CB6D3A4BAE95CA194937D5E73EA2122E@DBDE04.ent.ti.com>
[-- Attachment #1: Type: text/plain, Size: 3331 bytes --]
Hi Pekon,
On Fri, Oct 11, 2013 at 05:17:48AM -0500, Gupta, Pekon wrote:
> > > If I have my NAND formatted with one of the existing ECC schemes (e.g.
> > > OMAP_ECC_HAMMING_CODE_DEFAULT) will it work with the new
> > > OMAP_ECC_HAM1_CODE_HW scheme?
> > >
> > > Are they all compatible?
> > >
> > Yes, they all are 1-bit hamming code, the only difference between
> > xx_Default and xx_HW was who was doing the ECC calculation.
> > For xx_DEFAULT: ECC calculation was done on CPU via s/w library
> > For xx_HW: ECC calculation was done by in-build h/w engine.
> > So, all HAMMING_xx can be replaced by HAM1_HW.
> >
> > [snip]
> >
> > > > @@ -1342,9 +1342,7 @@ static void __maybe_unused
> > > gpmc_read_timings_dt(struct device_node *np,
> > > > #ifdef CONFIG_MTD_NAND
> > > >
> > > > static const char * const nand_ecc_opts[] = {
> > > > - [OMAP_ECC_HAMMING_CODE_DEFAULT] = "sw",
> > > > - [OMAP_ECC_HAMMING_CODE_HW] = "hw",
> > > > - [OMAP_ECC_HAMMING_CODE_HW_ROMCODE] = "hw-
> > > romcode",
> > > > + [OMAP_ECC_HAM1_CODE_HW] = "ham1",
> > > > [OMAP_ECC_BCH4_CODE_HW] = "bch4",
> > > > [OMAP_ECC_BCH8_CODE_HW] = "bch8",
> > >
> > > Won't this break existing dts which have "sw", "hw", or "hw-romcode"?
> > >
> > > Someone may try to use a new kernel with an old dt, and we marked them
> > > as deprecated, not removed.
> > >
> > HAMMING_xx ECC scheme was used only on legacy platforms, when
> > BCH8 was not available, I have not seen anyone using this scheme
> > *from mainline kernel* from quite a long time. So, it's safe to remove them.
> >
> > This is what was concluded as per below email.
> > http://lists.infradead.org/pipermail/linux-mtd/2013-September/048876.html
> >
>
> This patch-series and its follow-on series has already missed many merge
> windows, And the above discussion has reached a stalled state (infinite loop)
> where, I cannot revert some DT binding updates to and fro to keep all legacy
> DT bindings backward compatible forever.
> However, I can assure that these DT updates make binding stable for long-term.
>
> So now it's your discretion to whether to accept or leave following 2 series:
>
> http://lists.infradead.org/pipermail/linux-mtd/2013-October/048983.html
>
> http://lists.infradead.org/pipermail/linux-mtd/2013-October/049008.html
>
>
> AFAIK no-one is using Hamming based ecc-scheme on OMAP platforms
> *from mainline kernel*. So this DT update actually does not affect users
> I know of. Rather these patch series was intended for long term scalability
> and clean-up so that more OMAP users migrate to mainline kernel easily.
wouldn't something like below maintain backwards compatibility ?
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 579697a..f33ffe0 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1383,6 +1383,10 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
if (!strcasecmp(s, nand_ecc_opts[val])) {
gpmc_nand_data->ecc_opt = val;
break;
+ } else if (!strcasecmp(s, "sw") ||
+ !strcasecmp(s, "hw") ||
+ !strcasecmp(s, "hw-romcode")) {
+ gpmc_nand_data->ecc_opt = OMAP_ECC_HAM1_CODE_HW;
}
if (!of_property_read_string(child, "ti,nand-xfer-type", &s))
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-10-11 11:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 19:49 [PATCH v7 0/6] mtd:nand:omap2: clean-up of supported ECC schemes Pekon Gupta
2013-10-04 19:49 ` [PATCH v7 1/6] mtd: nand: omap: combine different flavours of 1-bit hamming ecc schemes Pekon Gupta
2013-10-07 11:27 ` Mark Rutland
2013-10-07 11:42 ` Gupta, Pekon
2013-10-11 10:17 ` Gupta, Pekon
2013-10-11 11:53 ` Felipe Balbi [this message]
2013-10-04 19:49 ` [PATCH v7 3/6] mtd:nand:omap2: clean-up BCHx_HW and BCHx_SW ECC configurations in device_probe Pekon Gupta
2013-10-04 19:49 ` [PATCH v7 4/6] mtd:nand:omap2: updated support for BCH4 ECC scheme Pekon Gupta
[not found] ` <1380916188-24206-1-git-send-email-pekon-l0cyMroinI0@public.gmane.org>
2013-10-04 19:49 ` [PATCH v7 2/6] ARM: OMAP2+: cleaned-up DT support of various ECC schemes Pekon Gupta
2013-10-07 11:35 ` Mark Rutland
2013-10-07 12:18 ` Gupta, Pekon
2013-10-04 19:49 ` [PATCH v7 5/6] ARM: dts: AM33xx: updated default ECC scheme in nand-ecc-opt Pekon Gupta
2013-10-07 11:40 ` Mark Rutland
2013-10-07 12:14 ` Gupta, Pekon
2013-10-04 19:49 ` [PATCH v7 6/6] mtd: nand: omap: updated devm_xx for all resource allocation and free calls Pekon Gupta
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=20131011115327.GA25706@radagast \
--to=balbi@ti.com \
--cc=Pawel.Moll@arm.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=avinashphilipk@gmail.com \
--cc=bcousson@baylibre.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=pekon@ti.com \
--cc=robherring2@gmail.com \
--cc=swarren@wwwdotorg.org \
--cc=tony@atomide.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).