Skip to content

Commit 06de125

Browse files
committed
mtd: spi-nor: remove NO_CHIP_ERASE flag
There's no flash using it and we'd like to rely instead on SFDP data, thus remove it. Tested-by: Fabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20231125123529.55686-5-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent 53919a9 commit 06de125

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

drivers/mtd/spi-nor/core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,9 +2888,6 @@ static void spi_nor_init_flags(struct spi_nor *nor)
28882888
nor->flags |= SNOR_F_HAS_SR_BP3_BIT6;
28892889
}
28902890

2891-
if (flags & NO_CHIP_ERASE)
2892-
nor->flags |= SNOR_F_NO_OP_CHIP_ERASE;
2893-
28942891
if (flags & SPI_NOR_RWW && nor->params->n_banks > 1 &&
28952892
!nor->controller_ops)
28962893
nor->flags |= SNOR_F_RWW;

drivers/mtd/spi-nor/core.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,6 @@ struct spi_nor_id {
489489
* Usually these will power-up in a write-protected
490490
* state.
491491
* SPI_NOR_NO_ERASE: no erase command needed.
492-
* NO_CHIP_ERASE: chip does not support chip erase.
493492
* SPI_NOR_NO_FR: can't do fastread.
494493
* SPI_NOR_QUAD_PP: flash supports Quad Input Page Program.
495494
* SPI_NOR_RWW: flash supports reads while write.
@@ -539,10 +538,9 @@ struct flash_info {
539538
#define SPI_NOR_BP3_SR_BIT6 BIT(4)
540539
#define SPI_NOR_SWP_IS_VOLATILE BIT(5)
541540
#define SPI_NOR_NO_ERASE BIT(6)
542-
#define NO_CHIP_ERASE BIT(7)
543-
#define SPI_NOR_NO_FR BIT(8)
544-
#define SPI_NOR_QUAD_PP BIT(9)
545-
#define SPI_NOR_RWW BIT(10)
541+
#define SPI_NOR_NO_FR BIT(7)
542+
#define SPI_NOR_QUAD_PP BIT(8)
543+
#define SPI_NOR_RWW BIT(9)
546544

547545
u8 no_sfdp_flags;
548546
#define SPI_NOR_SKIP_SFDP BIT(0)

0 commit comments

Comments
 (0)