Skip to content

Commit ca7fb35

Browse files
mwalleambarus
authored andcommitted
mtd: spi-nor: eon: convert flash_info to new format
The INFOx() macros are going away. Convert the flash_info database to the new format. Signed-off-by: Michael Walle <mwalle@kernel.org> Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-18-e60548861b10@kernel.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent f9d52ef commit ca7fb35

1 file changed

Lines changed: 54 additions & 18 deletions

File tree

drivers/mtd/spi-nor/eon.c

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,60 @@
99
#include "core.h"
1010

1111
static const struct flash_info eon_nor_parts[] = {
12-
{ "en25f32", INFO(0x1c3116, 0, 64 * 1024, 64)
13-
NO_SFDP_FLAGS(SECT_4K) },
14-
{ "en25p32", INFO(0x1c2016, 0, 64 * 1024, 64) },
15-
{ "en25q32b", INFO(0x1c3016, 0, 64 * 1024, 64) },
16-
{ "en25p64", INFO(0x1c2017, 0, 64 * 1024, 128) },
17-
{ "en25q64", INFO(0x1c3017, 0, 64 * 1024, 128)
18-
NO_SFDP_FLAGS(SECT_4K) },
19-
{ "en25q80a", INFO(0x1c3014, 0, 64 * 1024, 16)
20-
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
21-
{ "en25qh16", INFO(0x1c7015, 0, 64 * 1024, 32)
22-
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
23-
{ "en25qh32", INFO(0x1c7016, 0, 64 * 1024, 64) },
24-
{ "en25qh64", INFO(0x1c7017, 0, 64 * 1024, 128)
25-
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) },
26-
{ "en25qh128", INFO(0x1c7018, 0, 64 * 1024, 256) },
27-
{ "en25qh256", INFO(0x1c7019, 0, 64 * 1024, 0) },
28-
{ "en25s64", INFO(0x1c3817, 0, 64 * 1024, 128)
29-
NO_SFDP_FLAGS(SECT_4K) },
12+
{
13+
.id = SNOR_ID(0x1c, 0x31, 0x16),
14+
.name = "en25f32",
15+
.size = SZ_4M,
16+
.no_sfdp_flags = SECT_4K,
17+
}, {
18+
.id = SNOR_ID(0x1c, 0x20, 0x16),
19+
.name = "en25p32",
20+
.size = SZ_4M,
21+
}, {
22+
.id = SNOR_ID(0x1c, 0x30, 0x16),
23+
.name = "en25q32b",
24+
.size = SZ_4M,
25+
}, {
26+
.id = SNOR_ID(0x1c, 0x20, 0x17),
27+
.name = "en25p64",
28+
.size = SZ_8M,
29+
}, {
30+
.id = SNOR_ID(0x1c, 0x30, 0x17),
31+
.name = "en25q64",
32+
.size = SZ_8M,
33+
.no_sfdp_flags = SECT_4K,
34+
}, {
35+
.id = SNOR_ID(0x1c, 0x30, 0x14),
36+
.name = "en25q80a",
37+
.size = SZ_1M,
38+
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ,
39+
}, {
40+
.id = SNOR_ID(0x1c, 0x70, 0x15),
41+
.name = "en25qh16",
42+
.size = SZ_2M,
43+
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ,
44+
}, {
45+
.id = SNOR_ID(0x1c, 0x70, 0x16),
46+
.name = "en25qh32",
47+
.size = SZ_4M,
48+
}, {
49+
.id = SNOR_ID(0x1c, 0x70, 0x17),
50+
.name = "en25qh64",
51+
.size = SZ_8M,
52+
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ,
53+
}, {
54+
.id = SNOR_ID(0x1c, 0x70, 0x18),
55+
.name = "en25qh128",
56+
.size = SZ_16M,
57+
}, {
58+
.id = SNOR_ID(0x1c, 0x70, 0x19),
59+
.name = "en25qh256",
60+
}, {
61+
.name = "en25s64",
62+
.id = SNOR_ID(0x1c, 0x38, 0x17),
63+
.size = SZ_8M,
64+
.no_sfdp_flags = SECT_4K,
65+
},
3066
};
3167

3268
const struct spi_nor_manufacturer spi_nor_eon = {

0 commit comments

Comments
 (0)