[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b6531c3b-b550-48ae-9a57-29a11d9e5cf3@linaro.org>
Date: Thu, 20 Mar 2025 12:28:25 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>,
Santhosh Kumar K <s-k6@...com>
Cc: Pratyush Yadav <pratyush@...nel.org>, Michael Walle <michael@...le.cc>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Steam Lin <stlin2@...bond.com>, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/21] mtd: spinand: Use more specific naming for the page
read op
On 3/7/25 3:08 PM, Miquel Raynal wrote:
> 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 page read macro name.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
> ---
> drivers/mtd/nand/spi/core.c | 2 +-
> include/linux/mtd/spinand.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index 1959e8d9c64be004c71a0d6ac6454fde08e708fa..2ebc802299068ef69068422d1ef6585f63365832 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -372,7 +372,7 @@ static int spinand_load_page_op(struct spinand_device *spinand,
> {
> struct nand_device *nand = spinand_to_nand(spinand);
> unsigned int row = nanddev_pos_to_row(nand, &req->pos);
> - struct spi_mem_op op = SPINAND_PAGE_READ_OP(row);
> + struct spi_mem_op op = SPINAND_PAGE_READ_1S_1S_0_OP(row);
>
> return spi_mem_exec_op(spinand->spimem, &op);
> }
> diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
> index 545531afe2dac593d112065483afd180226cc533..882b635228860f45e52d516421c1fc3b2c723b9b 100644
> --- a/include/linux/mtd/spinand.h
> +++ b/include/linux/mtd/spinand.h
> @@ -56,7 +56,7 @@
> SPI_MEM_OP_NO_DUMMY, \
> SPI_MEM_OP_NO_DATA)
>
> -#define SPINAND_PAGE_READ_OP(addr) \
> +#define SPINAND_PAGE_READ_1S_1S_0_OP(addr) \
I now see that when all STR you chose to still put S next to the op
fields. 1_1_0_OP is alright too, it's equivalent to 1S-1S-0. Both are
fine for me:
Reviewed-by: Tudor Ambarus <tudor.ambarus@...aro.org>
> SPI_MEM_OP(SPI_MEM_OP_CMD(0x13, 1), \
> SPI_MEM_OP_ADDR(3, addr, 1), \
> SPI_MEM_OP_NO_DUMMY, \
>
Powered by blists - more mailing lists