Skip to content

Commit

Permalink
mtd: spi-nor: cadence-quadspi: Drop redundant WREN in erase path
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20200601070444.16923-7-vigneshr@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Vignesh Raghavendra authored and Mark Brown committed Jun 19, 2020
1 parent 935da5e commit 41b5ed6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/mtd/spi-nor/controllers/cadence-quadspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41b5ed6

Please sign in to comment.