From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Richard Weinberger <richard@nod.at>,
linux-mtd@lists.infradead.org,
Vignesh Raghavendra <vigneshr@ti.com>,
Fabio Estevam <festevam@gmail.com>,
Tudor Ambarus <Tudor.Ambarus@microchip.com>
Subject: Re: [PATCH v13 19/20] mtd: rawnand: Use the ECC framework user input parsing bits
Date: Mon, 28 Sep 2020 17:18:35 +0200 [thread overview]
Message-ID: <20200928171835.30c14cf2@xps13> (raw)
In-Reply-To: <20200921093603.GA19513@pengutronix.de>
Hi Sascha,
Sascha Hauer <s.hauer@pengutronix.de> wrote on Mon, 21 Sep 2020
11:36:03 +0200:
> On Thu, Aug 27, 2020 at 10:52:07AM +0200, Miquel Raynal wrote:
> > Many helpers are generic to all NAND chips, they should not be
> > raw-NAND specific, so use the generic ones.
> >
> > To avoid moving all the raw NAND core "history" into the generic NAND
> > layer, we keep a part of this parsing in the raw NAND core to ensure
> > backward compatibility.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
>
> ...
>
> > -static int of_get_nand_ecc_step_size(struct device_node *np)
> > +static void of_get_nand_ecc_legacy_user_config(struct nand_chip *chip)
> > {
> > - int ret;
> > - u32 val;
> > + struct device_node *dn = nand_get_flash_node(chip);
> > + struct nand_ecc_props *user_conf = &chip->base.ecc.user_conf;
> >
> > - ret = of_property_read_u32(np, "nand-ecc-step-size", &val);
> > - return ret ? ret : val;
> > -}
> > + if (user_conf->engine_type != NAND_ECC_ENGINE_TYPE_INVALID)
> > + user_conf->engine_type = of_get_rawnand_ecc_engine_type_legacy(dn);
>
> I think the intention is to set user_conf->engine_type when it's not set already,
> so this should be == instead of !=
>
> >
> > -static int of_get_nand_ecc_strength(struct device_node *np)
> > -{
> > - int ret;
> > - u32 val;
> > + if (user_conf->algo != NAND_ECC_ALGO_UNKNOWN)
> > + user_conf->algo = of_get_rawnand_ecc_algo_legacy(dn);
>
> ditto
>
> >
> > - ret = of_property_read_u32(np, "nand-ecc-strength", &val);
> > - return ret ? ret : val;
> > + if (user_conf->placement != NAND_ECC_PLACEMENT_UNKNOWN)
> > + user_conf->placement = of_get_rawnand_ecc_placement_legacy(dn);
>
> ditto
>
> Sascha
>
Sorry for the delay I was away.
You are completely right, I messed up with the logic here... This is
now fixed, thanks!
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-09-28 15:25 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 8:51 [PATCH v13 00/20] Introduction of the generic ECC framework Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 01/20] mtd: rawnand: Add a kernel doc to the ECC algorithm enumeration Miquel Raynal
2020-09-07 7:25 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 02/20] mtd: rawnand: Rename the ECC algorithm enumeration items Miquel Raynal
2020-09-07 7:25 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 03/20] mtd: rawnand: Move the nand_ecc_algo enum to the generic NAND layer Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 04/20] mtd: nand: Add a NAND page I/O request type Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 05/20] dt-bindings: mtd: Document nand-ecc-placement Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 06/20] dt-bindings: mtd: Document nand-ecc-engine Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 07/20] dt-bindings: mtd: Document boolean NAND ECC properties Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 08/20] mtd: nand: Introduce the ECC engine framework Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 09/20] mtd: rawnand: Separate the ECC engine type and the ECC byte placement Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-10-14 21:36 ` Han Xu
2020-10-15 1:35 ` Fabio Estevam
2020-10-15 3:09 ` Han Xu
2020-10-15 7:25 ` Miquel Raynal
2020-10-16 17:09 ` Han Xu
2020-10-16 17:14 ` Miquel Raynal
2020-10-16 17:51 ` Han Xu
2020-10-16 18:00 ` Miquel Raynal
2020-10-16 21:03 ` Fabio Estevam
2020-10-19 15:51 ` Han Xu
2020-10-19 16:52 ` Fabio Estevam
2020-08-27 8:51 ` [PATCH v13 10/20] mtd: rawnand: Use the new ECC engine type enumeration Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:51 ` [PATCH v13 11/20] mtd: nand: Create a helper to extract the ECC configuration Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 12/20] mtd: spinand: Use nanddev_get_ecc_conf() when relevant Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 13/20] mtd: nand: Create helpers to set/extract the ECC requirements Miquel Raynal
2020-09-07 7:24 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 14/20] mtd: rawnand: Use nanddev_get/set_ecc_requirements() when relevant Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 15/20] mtd: nand: Use the new generic ECC object Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 16/20] mtd: rawnand: Make use of the ECC framework Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 17/20] mtd: rawnand: Use the ECC framework OOB layouts Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
2020-09-20 12:21 ` Janusz Krzysztofik
2020-09-29 8:15 ` Miquel Raynal
2020-09-29 21:26 ` Janusz Krzysztofik
2020-08-27 8:52 ` [PATCH v13 18/20] mtd: rawnand: Use the ECC framework nand_ecc_is_strong_enough() helper Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
2020-08-27 8:52 ` [PATCH v13 19/20] mtd: rawnand: Use the ECC framework user input parsing bits Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
2020-09-21 9:36 ` Sascha Hauer
2020-09-28 15:18 ` Miquel Raynal [this message]
2020-08-27 8:52 ` [PATCH v13 20/20] mtd: rawnand: Use the NAND framework user_conf object for ECC flags Miquel Raynal
2020-09-07 7:23 ` Miquel Raynal
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=20200928171835.30c14cf2@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=Tudor.Ambarus@microchip.com \
--cc=festevam@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=s.hauer@pengutronix.de \
--cc=vigneshr@ti.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 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.