]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mtd: spinand: Use more specific naming for the erase op
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 3 Apr 2025 09:19:15 +0000 (11:19 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 29 Apr 2025 09:05:33 +0000 (11:05 +0200)
SPI operations have been initially described through macros implicitly
implying the use of a single SPI SDR bus. Macros for supporting dual and
quad I/O transfers have been added on top, generally inspired by vendor
naming, followed by DTR operations. Soon we might see octal
and even octal DTR operations as well (including the opcode byte).

Let's clarify what the macro really means by describing the expected bus
topology in the erase macro name.

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/spi/core.c
include/linux/mtd/spinand.h

index 28a539188c3feb6aaf84f0e2104f76580d7cbef9..991e3946e724de7c48d410ea982633738fd107de 100644 (file)
@@ -529,7 +529,7 @@ static int spinand_erase_op(struct spinand_device *spinand,
 {
        struct nand_device *nand = spinand_to_nand(spinand);
        unsigned int row = nanddev_pos_to_row(nand, pos);
-       struct spi_mem_op op = SPINAND_BLK_ERASE_OP(row);
+       struct spi_mem_op op = SPINAND_BLK_ERASE_1S_1S_0_OP(row);
 
        return spi_mem_exec_op(spinand->spimem, &op);
 }
index 8ea40d838dc247cab83452e8f0c33762d159150f..964f1244d6a612feadb4f2a3415fd6b10a6d93f5 100644 (file)
@@ -50,7 +50,7 @@
                   SPI_MEM_OP_NO_DUMMY,                                 \
                   SPI_MEM_OP_DATA_IN(1, valptr, 1))
 
-#define SPINAND_BLK_ERASE_OP(addr)                                     \
+#define SPINAND_BLK_ERASE_1S_1S_0_OP(addr)                             \
        SPI_MEM_OP(SPI_MEM_OP_CMD(0xd8, 1),                             \
                   SPI_MEM_OP_ADDR(3, addr, 1),                         \
                   SPI_MEM_OP_NO_DUMMY,                                 \