Skip to content

Commit 39133e5

Browse files
committed
mtd: spi-nor: spansion: let SFDP determine the flash and sector size
sector_size is used to determine the flash size and the erase size in case of uniform erase. n_sectors is used to determine the flash_size. But the flash size and the erase sizes are determined when parsing SFDP, let SFDP determine them. Tested-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Link: https://lore.kernel.org/r/20230726075257.12985-10-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent 68a86d1 commit 39133e5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/mtd/spi-nor/spansion.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -873,11 +873,11 @@ static const struct flash_info spansion_nor_parts[] = {
873873
PARSE_SFDP
874874
MFR_FLAGS(USE_CLPEF)
875875
.fixups = &s25fs256t_fixups },
876-
{ "s25hl512t", INFO6(0x342a1a, 0x0f0390, 256 * 1024, 256)
876+
{ "s25hl512t", INFO6(0x342a1a, 0x0f0390, 0, 0)
877877
PARSE_SFDP
878878
MFR_FLAGS(USE_CLPEF)
879879
.fixups = &s25hx_t_fixups },
880-
{ "s25hl01gt", INFO6(0x342a1b, 0x0f0390, 256 * 1024, 512)
880+
{ "s25hl01gt", INFO6(0x342a1b, 0x0f0390, 0, 0)
881881
PARSE_SFDP
882882
MFR_FLAGS(USE_CLPEF)
883883
.fixups = &s25hx_t_fixups },
@@ -886,11 +886,11 @@ static const struct flash_info spansion_nor_parts[] = {
886886
MFR_FLAGS(USE_CLPEF)
887887
FLAGS(NO_CHIP_ERASE)
888888
.fixups = &s25hx_t_fixups },
889-
{ "s25hs512t", INFO6(0x342b1a, 0x0f0390, 256 * 1024, 256)
889+
{ "s25hs512t", INFO6(0x342b1a, 0x0f0390, 0, 0)
890890
PARSE_SFDP
891891
MFR_FLAGS(USE_CLPEF)
892892
.fixups = &s25hx_t_fixups },
893-
{ "s25hs01gt", INFO6(0x342b1b, 0x0f0390, 256 * 1024, 512)
893+
{ "s25hs01gt", INFO6(0x342b1b, 0x0f0390, 0, 0)
894894
PARSE_SFDP
895895
MFR_FLAGS(USE_CLPEF)
896896
.fixups = &s25hx_t_fixups },
@@ -901,22 +901,22 @@ static const struct flash_info spansion_nor_parts[] = {
901901
.fixups = &s25hx_t_fixups },
902902
{ "cy15x104q", INFO6(0x042cc2, 0x7f7f7f, 512 * 1024, 1)
903903
FLAGS(SPI_NOR_NO_ERASE) },
904-
{ "s28hl512t", INFO(0x345a1a, 0, 256 * 1024, 256)
904+
{ "s28hl512t", INFO(0x345a1a, 0, 0, 0)
905905
PARSE_SFDP
906906
MFR_FLAGS(USE_CLPEF)
907907
.fixups = &s28hx_t_fixups,
908908
},
909-
{ "s28hl01gt", INFO(0x345a1b, 0, 256 * 1024, 512)
909+
{ "s28hl01gt", INFO(0x345a1b, 0, 0, 0)
910910
PARSE_SFDP
911911
MFR_FLAGS(USE_CLPEF)
912912
.fixups = &s28hx_t_fixups,
913913
},
914-
{ "s28hs512t", INFO(0x345b1a, 0, 256 * 1024, 256)
914+
{ "s28hs512t", INFO(0x345b1a, 0, 0, 0)
915915
PARSE_SFDP
916916
MFR_FLAGS(USE_CLPEF)
917917
.fixups = &s28hx_t_fixups,
918918
},
919-
{ "s28hs01gt", INFO(0x345b1b, 0, 256 * 1024, 512)
919+
{ "s28hs01gt", INFO(0x345b1b, 0, 0, 0)
920920
PARSE_SFDP
921921
MFR_FLAGS(USE_CLPEF)
922922
.fixups = &s28hx_t_fixups,

0 commit comments

Comments
 (0)