From: Siva Durga Prasad Paladugu Date: Tue, 3 Mar 2015 18:39:50 +0000 (+0530) Subject: sf: set stripe flag while erasing incase of dual parallel X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb06d5a55b9319c60d4a672b12a82f13f36a5461;p=thirdparty%2Fu-boot.git 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 --- 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");