Skip to content

Commit 36e4618

Browse files
committed
mtd: spinand: Use more specific naming for the program execution op
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 program execution macro name. Acked-by: Tudor Ambarus <[email protected]> [Miquel: Fixed conflicts with -next by updating esmt and micron drivers] Signed-off-by: Miquel Raynal <[email protected]>
1 parent 9c69110 commit 36e4618

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/mtd/nand/spi/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ static int spinand_program_op(struct spinand_device *spinand,
519519
{
520520
struct nand_device *nand = spinand_to_nand(spinand);
521521
unsigned int row = nanddev_pos_to_row(nand, &req->pos);
522-
struct spi_mem_op op = SPINAND_PROG_EXEC_OP(row);
522+
struct spi_mem_op op = SPINAND_PROG_EXEC_1S_1S_0_OP(row);
523523

524524
return spi_mem_exec_op(spinand->spimem, &op);
525525
}

drivers/mtd/nand/spi/esmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static int f50l1g41lb_otp_lock(struct spinand_device *spinand, loff_t from,
138138
size_t len)
139139
{
140140
struct spi_mem_op write_op = SPINAND_WR_EN_DIS_1S_0_0_OP(true);
141-
struct spi_mem_op exec_op = SPINAND_PROG_EXEC_OP(0);
141+
struct spi_mem_op exec_op = SPINAND_PROG_EXEC_1S_1S_0_OP(0);
142142
u8 status;
143143
int ret;
144144

drivers/mtd/nand/spi/micron.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static int mt29f2g01abagd_otp_lock(struct spinand_device *spinand, loff_t from,
252252
size_t len)
253253
{
254254
struct spi_mem_op write_op = SPINAND_WR_EN_DIS_1S_0_0_OP(true);
255-
struct spi_mem_op exec_op = SPINAND_PROG_EXEC_OP(0);
255+
struct spi_mem_op exec_op = SPINAND_PROG_EXEC_1S_1S_0_OP(0);
256256
u8 status;
257257
int ret;
258258

include/linux/mtd/spinand.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
SPI_MEM_DTR_OP_DATA_IN(len, buf, 4), \
171171
SPI_MEM_OP_MAX_FREQ(freq))
172172

173-
#define SPINAND_PROG_EXEC_OP(addr) \
173+
#define SPINAND_PROG_EXEC_1S_1S_0_OP(addr) \
174174
SPI_MEM_OP(SPI_MEM_OP_CMD(0x10, 1), \
175175
SPI_MEM_OP_ADDR(3, addr, 1), \
176176
SPI_MEM_OP_NO_DUMMY, \

0 commit comments

Comments
 (0)