]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: Pass the CS line to be selected in struct nand_operation
authorBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 11 Nov 2018 07:55:15 +0000 (08:55 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 7 Dec 2018 09:38:25 +0000 (10:38 +0100)
commitb5e775ab98b9e0a1293f7fa8a62fa030ebd1fca0
treeac6dc91792dc40771cdeea7ccb4213c4704fd1fc
parente692799c432d9c85fcc5a96f1eaca31a9f4a2d55
mtd: rawnand: Pass the CS line to be selected in struct nand_operation

In order to deprecate the ->select_chip hook we need to pass the CS
line a NAND operations are targeting. This is done through the
addition of a cs field to the nand_operation struct.

We also need to keep track of the currently selected target to
properly initialize op->cs, hence the ->cur_cs field addition to the
nand_chip struct.

Note that op->cs is not assigned in nand_exec_op() because we might
rework the way we execute NAND operations in the future (adopt a
queuing mechanism instead of the serialization we have right now).

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/internals.h
drivers/mtd/nand/raw/nand_base.c
drivers/mtd/nand/raw/nand_hynix.c
include/linux/mtd/rawnand.h