[U-Boot] [PATCH v7 24/34] sf: Drop SNOR_F_SST_WR flash->flags
Jagan Teki
jteki at openedev.com
Thu Nov 26 13:04:08 CET 2015
Since mtd_info{} ops are used instead of spi_flash{} ops
there is no need to check the flash->flags to SNOR_F_SST_WR
as sf_ops behaves as a core to handling generic flash
functionalities for both dm and non-dm.
Cc: Bin Meng <bmeng.cn at gmail.com>
Signed-off-by: Jagan Teki <jteki at openedev.com>
---
drivers/mtd/spi/sf_internal.h | 3 +--
drivers/mtd/spi/sf_ops.c | 6 +-----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 677f582..6c4ce77 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -52,8 +52,7 @@ enum {
#define SST_WR (SST_BP | SST_WP)
enum spi_nor_option_flags {
- SNOR_F_SST_WR = (1 << 0),
- SNOR_F_USE_FSR = (1 << 1),
+ SNOR_F_USE_FSR = (1 << 0),
};
#define SPI_FLASH_3B_ADDR_LEN 3
diff --git a/drivers/mtd/spi/sf_ops.c b/drivers/mtd/spi/sf_ops.c
index 4e80d66..4e2845c 100644
--- a/drivers/mtd/spi/sf_ops.c
+++ b/drivers/mtd/spi/sf_ops.c
@@ -999,14 +999,10 @@ int spi_flash_scan(struct spi_flash *flash)
flash->memory_map = flash->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 */
mtd->_write = spi_flash_cmd_write_ops;
#if defined(CONFIG_SPI_FLASH_SST)
- if (flash->flags & SNOR_F_SST_WR) {
+ if (params->flags & SST_WR) {
if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
mtd->_write = sst_write_bp;
else
--
1.9.1
More information about the U-Boot
mailing list