Commit 41e086e1 authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Miquel Raynal

mtd: spi-nor: Fix direction of the write_sr() transfer

write_sr() sends data to the SPI memory, fix the direction.

Fixes: b35b9a10 ("mtd: spi-nor: Move m25p80 code in spi-nor.c")
Reported-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Tested-by: default avatarJohn Garry <john.garry@huawei.com>
Acked-by: default avatarVignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 54ecb8f7
......@@ -487,7 +487,7 @@ static int write_sr(struct spi_nor *nor, u8 val)
SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_WRSR, 1),
SPI_MEM_OP_NO_ADDR,
SPI_MEM_OP_NO_DUMMY,
SPI_MEM_OP_DATA_IN(1, nor->bouncebuf, 1));
SPI_MEM_OP_DATA_OUT(1, nor->bouncebuf, 1));
return spi_mem_exec_op(nor->spimem, &op);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment