From eb06d5a55b9319c60d4a672b12a82f13f36a5461 Mon Sep 17 00:00:00 2001 From: Siva Durga Prasad Paladugu Date: Wed, 4 Mar 2015 00:09:50 +0530 Subject: [PATCH] sf: set stripe flag while erasing incase of dual parallel Set stripe flag while erasing incase of dual parallel configurations. This enables sending erase commands to both the flash parts separately. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- drivers/mtd/spi/sf_ops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c index 1ce4ab7b7fd..d1bb41bcfe5 100644 --- a/drivers/mtd/spi/sf_ops.c +++ b/drivers/mtd/spi/sf_ops.c @@ -374,6 +374,11 @@ int spi_flash_cmd_erase_ops(struct spi_flash *flash, u32 offset, size_t len) debug("SF: erase %2x %2x %2x %2x (%x)\n", cmd[0], cmd[1], cmd[2], cmd[3], erase_addr); +#ifdef CONFIG_SPI_GENERIC + if (flash->dual_flash == SF_DUAL_PARALLEL_FLASH) + flash->spi->flags |= SPI_XFER_STRIPE; +#endif + ret = spi_flash_write_common(flash, cmd, sizeof(cmd), NULL, 0); if (ret < 0) { debug("SF: erase failed\n"); -- 2.47.3