diff mbox series

[v3,6/8] mtd: spi-nor: cadence-quadspi: Drop redundant WREN in erase path

Message ID 20200601054725.2060-7-vigneshr@ti.com
State Superseded
Delegated to: Ambarus Tudor
Headers show
Series mtd: spi-nor: Move cadence-qaudspi to spi-mem framework | expand

Commit Message

Raghavendra, Vignesh June 1, 2020, 5:47 a.m. UTC
Drop redundant WREN command in cqspi_erase() as SPI NOR core takes care
of sending WREN command before sending erase command.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/mtd/spi-nor/controllers/cadence-quadspi.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Tudor Ambarus June 1, 2020, 6:32 a.m. UTC | #1
On Monday, June 1, 2020 8:47:23 AM EEST Vignesh Raghavendra wrote:
> Drop redundant WREN command in cqspi_erase() as SPI NOR core takes care
> of sending WREN command before sending erase command.
> 
> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
> ---
>  drivers/mtd/spi-nor/controllers/cadence-quadspi.c | 5 -----
>  1 file changed, 5 deletions(-)

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/controllers/cadence-quadspi.c b/drivers/mtd/spi-nor/controllers/cadence-quadspi.c
index 0570ebca135a..6b1cbad25e3f 100644
--- a/drivers/mtd/spi-nor/controllers/cadence-quadspi.c
+++ b/drivers/mtd/spi-nor/controllers/cadence-quadspi.c
@@ -1016,11 +1016,6 @@  static int cqspi_erase(struct spi_nor *nor, loff_t offs)
 	if (ret)
 		return ret;
 
-	/* Send write enable, then erase commands. */
-	ret = nor->controller_ops->write_reg(nor, SPINOR_OP_WREN, NULL, 0);
-	if (ret)
-		return ret;
-
 	/* Set up command buffer. */
 	ret = cqspi_command_write_addr(nor, nor->erase_opcode, offs);
 	if (ret)