* [Question] should {read,write}_page hooks moved to nand_controller_ops ?
@ 2019-01-25 8:23 Masahiro Yamada
2019-01-25 9:15 ` Boris Brezillon
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2019-01-25 8:23 UTC (permalink / raw)
To: linux-mtd; +Cc: Boris Brezillon, Miquel Raynal
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?
Boris and Miquel are doing a great job
for the NAND framework improvement.
So, maybe it is already in their TODO list.
It is what just popped in my mind.
Thanks.
--
Best Regards
Masahiro Yamada
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question] should {read,write}_page hooks moved to nand_controller_ops ?
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
2019-01-25 13:45 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Boris Brezillon @ 2019-01-25 9:15 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Boris Brezillon, linux-mtd, Miquel Raynal
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question] should {read,write}_page hooks moved to nand_controller_ops ?
2019-01-25 9:15 ` Boris Brezillon
@ 2019-01-25 13:45 ` Masahiro Yamada
0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-01-25 13:45 UTC (permalink / raw)
To: Boris Brezillon; +Cc: Boris Brezillon, linux-mtd, Miquel Raynal
Hi Boris,
On Fri, Jan 25, 2019 at 6:15 PM Boris Brezillon <bbrezillon@kernel.org> wrote:
>
> 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).
Fascinating.
It is good to know you are planning a better HW modeling.
Thanks for explanation!
> 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/
--
Best Regards
Masahiro Yamada
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-25 13:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-01-25 13:45 ` Masahiro Yamada
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.