Skip to contentSkip to conversation

sf: Correct flash->flags for SST flash

PATCH New Bin Meng 2 participants 2 messages Nov 16, 2015 – Nov 19, 2015 Memory technology devices (MTD)

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 sf: Correct flash->flags for SST flash

flash->flags for SST flash should be updated for both DM and non-DM flash drivers.

---

 drivers/mtd/spi/sf_probe.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/mtd/spi/sf_probe.c +5 -4
index bc05d30..fcfac44 100644
@@ -164,14 +164,15 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode,
 	flash->memory_map = spi->memory_map;
 	flash->dual_flash = flash->spi->option;
 
+	/* Assign spi flash flags */
+	if (params->flags & SST_WR)
+		flash->flags |= SNOR_F_SST_WR;
+
 	/* Assign spi_flash ops */
 #ifndef CONFIG_DM_SPI_FLASH
 	flash->write = spi_flash_cmd_write_ops;
 #if defined(CONFIG_SPI_FLASH_SST)
-	if (params->flags & SST_WR)
-		flash->flags |= SNOR_F_SST_WR;
-
-	if (params->flags & SNOR_F_SST_WR) {
+	if (flash->flags & SNOR_F_SST_WR) {
 		if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
 			flash->write = sst_write_bp;
 		else
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 sf: Correct flash->flags for SST flash

Quoted 5 lines · Bin Meng

flash->flags for SST flash should be updated for both DM and non-DM flash drivers.

---

Applied to u-boot-spi/master

thanks!

Signature · 1 line
Jagan.