Skip to content

Commit 461d0ba

Browse files
committed
mtd: spi-nor: spansion: enable die erase for multi die flashes
Enable die erase for spansion multi die flashes. Tested-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Link: https://lore.kernel.org/r/20231125123529.55686-3-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent 9641423 commit 461d0ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mtd/spi-nor/spansion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#define SPINOR_OP_CLSR 0x30 /* Clear status register 1 */
1919
#define SPINOR_OP_CLPEF 0x82 /* Clear program/erase failure flags */
20+
#define SPINOR_OP_CYPRESS_DIE_ERASE 0x61 /* Chip (die) erase */
2021
#define SPINOR_OP_RD_ANY_REG 0x65 /* Read any register */
2122
#define SPINOR_OP_WR_ANY_REG 0x71 /* Write any register */
2223
#define SPINOR_REG_CYPRESS_VREG 0x00800000
@@ -644,6 +645,7 @@ static int s25hx_t_late_init(struct spi_nor *nor)
644645
params->ready = cypress_nor_sr_ready_and_clear;
645646
cypress_nor_ecc_init(nor);
646647

648+
params->die_erase_opcode = SPINOR_OP_CYPRESS_DIE_ERASE;
647649
return 0;
648650
}
649651

@@ -933,7 +935,6 @@ static const struct flash_info spansion_nor_parts[] = {
933935
.id = SNOR_ID(0x34, 0x2a, 0x1c, 0x0f, 0x00, 0x90),
934936
.name = "s25hl02gt",
935937
.mfr_flags = USE_CLPEF,
936-
.flags = NO_CHIP_ERASE,
937938
.fixups = &s25hx_t_fixups
938939
}, {
939940
.id = SNOR_ID(0x34, 0x2b, 0x19, 0x0f, 0x08, 0x90),
@@ -954,7 +955,6 @@ static const struct flash_info spansion_nor_parts[] = {
954955
.id = SNOR_ID(0x34, 0x2b, 0x1c, 0x0f, 0x00, 0x90),
955956
.name = "s25hs02gt",
956957
.mfr_flags = USE_CLPEF,
957-
.flags = NO_CHIP_ERASE,
958958
.fixups = &s25hx_t_fixups
959959
}, {
960960
.id = SNOR_ID(0x34, 0x5a, 0x1a),

0 commit comments

Comments
 (0)