mtd: rawnand: Add destructive operation
authorBoris Brezillon <bbrezillon@kernel.org>
Sat, 25 Nov 2023 01:24:35 +0000 (17:24 -0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 4 Dec 2023 10:51:40 +0000 (11:51 +0100)
commit578dc962ff2000ba4bf52d50717aea0819615634
tree8445dedcc25b047715785d967aa3660e8989f859
parent2082b6956ce95b66b03983f3059744f559493d98
mtd: rawnand: Add destructive operation

Erase and program operations need the write protect (wp) pin to be
de-asserted to take effect. Add the concept of destructive
operation and pass the information to exec_op() so controllers know
when they should de-assert this pin without having to decode
the command opcode.

Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
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-1-dregan@broadcom.com
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h