Skip to content

Commit 947c86e

Browse files
zmlin1998Pratyush Yadav
authored andcommitted
mtd: spi-nor: macronix: Drop the redundant flash info fields
Many flash devices share the same ID but have different part numbers. To avoid confusion, the part number field is removed. Additionally, since SFDP already provides size information and functionality covered by no_sfdp_flags, these fields are also removed. Furthermore, when 4-byte address instruction table is available, the SPI_NOR_4B_OPCODES flag is no longer needed and is removed. Signed-off-by: Cheng Ming Lin <[email protected]> Acked-by: Tudor Ambarus <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0af2f6b commit 947c86e

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

drivers/mtd/spi-nor/macronix.c

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@ static const struct flash_info macronix_nor_parts[] = {
8888
.name = "mx25l8005",
8989
.size = SZ_1M,
9090
}, {
91+
/* MX25L1606E */
9192
.id = SNOR_ID(0xc2, 0x20, 0x15),
92-
.name = "mx25l1606e",
93-
.size = SZ_2M,
94-
.no_sfdp_flags = SECT_4K,
9593
}, {
9694
.id = SNOR_ID(0xc2, 0x20, 0x16),
9795
.name = "mx25l3205d",
@@ -103,29 +101,21 @@ static const struct flash_info macronix_nor_parts[] = {
103101
.size = SZ_8M,
104102
.no_sfdp_flags = SECT_4K,
105103
}, {
104+
/* MX25L12805D */
106105
.id = SNOR_ID(0xc2, 0x20, 0x18),
107-
.name = "mx25l12805d",
108-
.size = SZ_16M,
109106
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP,
110-
.no_sfdp_flags = SECT_4K,
111107
}, {
108+
/* MX25L25635E, MX25L25645G */
112109
.id = SNOR_ID(0xc2, 0x20, 0x19),
113-
.name = "mx25l25635e",
114-
.size = SZ_32M,
115-
.no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
116110
.fixups = &mx25l25635_fixups
117111
}, {
112+
/* MX66L51235F */
118113
.id = SNOR_ID(0xc2, 0x20, 0x1a),
119-
.name = "mx66l51235f",
120-
.size = SZ_64M,
121-
.no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
122114
.fixup_flags = SPI_NOR_4B_OPCODES,
123115
.fixups = &macronix_qpp4b_fixups,
124116
}, {
117+
/* MX66L1G45G */
125118
.id = SNOR_ID(0xc2, 0x20, 0x1b),
126-
.name = "mx66l1g45g",
127-
.size = SZ_128M,
128-
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
129119
.fixups = &macronix_qpp4b_fixups,
130120
}, {
131121
/* MX66L2G45G */
@@ -167,11 +157,8 @@ static const struct flash_info macronix_nor_parts[] = {
167157
.size = SZ_16M,
168158
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
169159
}, {
160+
/* MX25U51245G */
170161
.id = SNOR_ID(0xc2, 0x25, 0x3a),
171-
.name = "mx25u51245g",
172-
.size = SZ_64M,
173-
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
174-
.fixup_flags = SPI_NOR_4B_OPCODES,
175162
.fixups = &macronix_qpp4b_fixups,
176163
}, {
177164
.id = SNOR_ID(0xc2, 0x25, 0x3a),
@@ -185,11 +172,8 @@ static const struct flash_info macronix_nor_parts[] = {
185172
.id = SNOR_ID(0xc2, 0x25, 0x3b),
186173
.fixups = &macronix_qpp4b_fixups,
187174
}, {
175+
/* MX66U2G45G */
188176
.id = SNOR_ID(0xc2, 0x25, 0x3c),
189-
.name = "mx66u2g45g",
190-
.size = SZ_256M,
191-
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
192-
.fixup_flags = SPI_NOR_4B_OPCODES,
193177
.fixups = &macronix_qpp4b_fixups,
194178
}, {
195179
.id = SNOR_ID(0xc2, 0x26, 0x18),
@@ -215,15 +199,13 @@ static const struct flash_info macronix_nor_parts[] = {
215199
.size = SZ_4M,
216200
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
217201
}, {
202+
/* MX25UW51245G */
218203
.id = SNOR_ID(0xc2, 0x81, 0x3a),
219-
.name = "mx25uw51245g",
220204
.n_banks = 4,
221205
.flags = SPI_NOR_RWW,
222206
}, {
207+
/* MX25L3255E */
223208
.id = SNOR_ID(0xc2, 0x9e, 0x16),
224-
.name = "mx25l3255e",
225-
.size = SZ_4M,
226-
.no_sfdp_flags = SECT_4K,
227209
},
228210
/*
229211
* This spares us of adding new flash entries for flashes that can be

0 commit comments

Comments
 (0)