Hi Masahiro, On Fri, 25 Jan 2019 17:23:28 +0900 Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> 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/