public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <bbrezillon@kernel.org>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: Re: [Question] should {read,write}_page hooks moved to nand_controller_ops ?
Date: Fri, 25 Jan 2019 10:15:24 +0100	[thread overview]
Message-ID: <20190125101508.57f39514@bbrezillon> (raw)
In-Reply-To: <CAK7LNAStZip5agGJZg8o_-k2re9zHuh0xHx8XiZVz3ixUmgXMg@mail.gmail.com>

Hi Masahiro,

On Fri, 25 Jan 2019 17:23:28 +0900
Masahiro Yamada <yamada.masahiro@socionext.com> wrote:

> Hello.
> 
> 
> Many hooks in nand_ecc_ctrl, such as read_page, write_page, etc.
> look controller-specific instead of per-chip.
> 
> Will they be moved to nand_controller_op or somewhere
> in the future?

Not exactly :-). I don't know if I should say it, but Miquel is working
on a generic NAND ECC engine framework which we'll try to re-use at the
raw NAND layer. The idea is to dissociate the ECC engine concept from
the NAND controller one. I imagine something like this:

	ecc_engine->prepare_page_io_req(nand, ioreq);
	nand_controller->do_page_io(nand, ioreq);
	ecc_engine->finish_page_io_req(nand, ioreq);

If we go for this approach, the nand controller should only have one
hook: ->do_page_io(), and this hook would indeed be placed in
nand_controller_ops. Once we have that in place, we can deprecate the
ecc field in nand_chip (by moving it to nand_legacy).

Of course, this implies making the raw NAND framework use the generic
NAND layer (which I started to work on here [1]).

> 
> Boris and Miquel are doing a great job
> for the NAND framework improvement.

Thanks.

> So, maybe it is already in their TODO list.

It is, but, given the amount of work needed, it's unlikely to pop up in
a near future.

Regards,

Boris

[1]https://github.com/bbrezillon/linux/commits/nand/cleanup

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

  reply	other threads:[~2019-01-25  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25  8:23 [Question] should {read,write}_page hooks moved to nand_controller_ops ? Masahiro Yamada
2019-01-25  9:15 ` Boris Brezillon [this message]
2019-01-25 13:45   ` Masahiro Yamada

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=20190125101508.57f39514@bbrezillon \
    --to=bbrezillon@kernel.org \
    --cc=boris.brezillon@bootlin.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=yamada.masahiro@socionext.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