diff options
author | David Regan <dregan@broadcom.com> | 2023-11-24 17:24:36 -0800 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-12-04 11:51:40 +0100 |
commit | 68cce21e3cc5fea8d955a62394454149270c98bc (patch) | |
tree | fae745b5ff5de26065630be1e4aa1bcbb7f0d401 /include/linux/mtd | |
parent | 578dc962ff2000ba4bf52d50717aea0819615634 (diff) | |
download | linux-68cce21e3cc5fea8d955a62394454149270c98bc.tar.gz linux-68cce21e3cc5fea8d955a62394454149270c98bc.tar.bz2 linux-68cce21e3cc5fea8d955a62394454149270c98bc.zip |
mtd: rawnand: NAND controller write protect
Allow NAND controller to be responsible for write protect pin
handling during fast path and exec_op destructive operation
when controller_wp flag is set.
Signed-off-by: David Regan <dregan@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-2-dregan@broadcom.com
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/rawnand.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index bd02aba5e6e3..a17f795070d8 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -1115,6 +1115,7 @@ struct nand_controller_ops { * the bus without restarting an entire read operation nor * changing the column. * @supported_op.cont_read: The controller supports sequential cache reads. + * @controller_wp: the controller is in charge of handling the WP pin. */ struct nand_controller { struct mutex lock; @@ -1123,6 +1124,7 @@ struct nand_controller { unsigned int data_only_read: 1; unsigned int cont_read: 1; } supported_op; + bool controller_wp; }; static inline void nand_controller_init(struct nand_controller *nfc) |