linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Han Xu <xhnjupt@gmail.com>, Vignesh Raghavendra <vigneshr@ti.com>,
	Tudor Ambarus <Tudor.Ambarus@microchip.com>,
	Richard Weinberger <richard@nod.at>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [PATCH] mtd: rawnand: mxc: Move the ECC engine initialization to the right place
Date: Fri, 16 Oct 2020 18:32:33 -0300	[thread overview]
Message-ID: <CAOMZO5A8Y1=o6e3+BvBUVYpBUjhvdVG4eQm4fTan3+cZVTvG1A@mail.gmail.com> (raw)
In-Reply-To: <20201016230556.6693e69f@xps13>

Hi Miquel,

On Fri, Oct 16, 2020 at 6:06 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Nice catch! But I don't get why host->pdata.hw_ecc would not be
> accessible from the attach hook. host->pdata is populated in the probe
> function, way before nand_scan(), where ->attach() is called. So for me
> host->pdata.hw_ecc should be accessible from ->attach().

Yes, now I understand it. pdata is only populated for non-dt platforms.

On 5.10-rc1 the non-dt imx users are gone, so we can get rid of pdata
on a separate patch.

> > Instead of using pdata, we can retrieve the "nand-ecc-mode" string
> > from the device tree.
>
> Please don't do that! The DT parsing should be centralized in the core.
>
> However, if you don't need this pdata entry you can get rid of it
> entirely. In theory, if the user set the nand-ecc-mode property, then
> chip->ecc.engine_type should already be set to the appropriate value
> when entering ->attach(). Can you please check its value? It should
> have been updated by rawnand_dt_init().

You are right. I have sent a v2, which lets the core determine the engine type.

Thanks,

Fabio Estevam

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2020-10-16 21:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  7:49 [PATCH] mtd: rawnand: mxc: Move the ECC engine initialization to the right place Miquel Raynal
2020-10-16 11:32 ` Fabio Estevam
2020-10-16 11:45   ` Fabio Estevam
2020-10-16 12:05     ` Miquel Raynal
2020-10-16 12:11       ` Fabio Estevam
2020-10-16 13:53 ` Sascha Hauer
2020-10-16 17:01   ` Miquel Raynal
2020-10-16 17:37     ` Fabio Estevam
2020-10-16 19:18     ` Fabio Estevam
2020-10-16 21:05       ` Miquel Raynal
2020-10-16 21:32         ` Fabio Estevam [this message]
2020-10-17 18:17           ` 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='CAOMZO5A8Y1=o6e3+BvBUVYpBUjhvdVG4eQm4fTan3+cZVTvG1A@mail.gmail.com' \
    --to=festevam@gmail.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=s.hauer@pengutronix.de \
    --cc=vigneshr@ti.com \
    --cc=xhnjupt@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).