summaryrefslogtreecommitdiff
path: root/include/linux/mtd/rawnand.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-01-12 10:36:35 +0100
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-01-13 17:35:26 +0100
commit9f820fc0651c32f8dde26b8e3ad93e1b9fdb62c4 (patch)
tree6b9d52607b333012ff9e812c91a51e924a1236b3 /include/linux/mtd/rawnand.h
parent568494db680991d6a09b5ab92dcddb7dfd3cbe25 (diff)
mtd: rawnand: Check the data only read pattern only once
Instead of checking if a pattern is supported each time we need it, let's create a bitfield that only the core would be allowed to fill at startup time. The core and the individual drivers may then use it in order to check what operation they should use. This bitfield is supposed to grow over time. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Liao Jaime <jaimeliao.tw@gmail.com> Link: https://lore.kernel.org/linux-mtd/20230112093637.987838-2-miquel.raynal@bootlin.com
Diffstat (limited to 'include/linux/mtd/rawnand.h')
-rw-r--r--include/linux/mtd/rawnand.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index dcf90144d70b..28c5dce782dd 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -1094,10 +1094,18 @@ struct nand_controller_ops {
*
* @lock: lock used to serialize accesses to the NAND controller
* @ops: NAND controller operations.
+ * @supported_op: NAND controller known-to-be-supported operations,
+ * only writable by the core after initial checking.
+ * @supported_op.data_only_read: The controller supports reading more data from
+ * the bus without restarting an entire read operation nor
+ * changing the column.
*/
struct nand_controller {
struct mutex lock;
const struct nand_controller_ops *ops;
+ struct {
+ unsigned int data_only_read: 1;
+ } supported_op;
};
static inline void nand_controller_init(struct nand_controller *nfc)