]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mtd: spinand: Use more specific naming for the read ID op
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 3 Apr 2025 09:19:13 +0000 (11:19 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 29 Apr 2025 09:01:58 +0000 (11:01 +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 read ID 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 e1c397177eeed0ee0ff4c8a30617bc9e59e0c8f3..40bd4fe996f26ca24d83ae54bb695b9b86bef5a7 100644 (file)
@@ -583,7 +583,7 @@ out:
 static int spinand_read_id_op(struct spinand_device *spinand, u8 naddr,
                              u8 ndummy, u8 *buf)
 {
-       struct spi_mem_op op = SPINAND_READID_OP(
+       struct spi_mem_op op = SPINAND_READID_1S_1S_1S_OP(
                naddr, ndummy, spinand->scratchbuf, SPINAND_MAX_ID_LEN);
        int ret;
 
index 87d8f9f2017e3dd25af37bf1bc85c77a8d31573a..dfb5c74cad6dbe991620d0331c7fc63c725ff6b4 100644 (file)
@@ -32,7 +32,7 @@
                   SPI_MEM_OP_NO_DUMMY,                                 \
                   SPI_MEM_OP_NO_DATA)
 
-#define SPINAND_READID_OP(naddr, ndummy, buf, len)                     \
+#define SPINAND_READID_1S_1S_1S_OP(naddr, ndummy, buf, len)            \
        SPI_MEM_OP(SPI_MEM_OP_CMD(0x9f, 1),                             \
                   SPI_MEM_OP_ADDR(naddr, 0, 1),                        \
                   SPI_MEM_OP_DUMMY(ndummy, 1),                         \