Commit 348d772d authored by Michael Walle's avatar Michael Walle Committed by Tudor Ambarus

mtd: spi-nor: winbond: convert flash_info to new format

The INFOx() macros are going away. Convert the flash_info database to
the new format.
Signed-off-by: default avatarMichael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-28-e60548861b10@kernel.orgSigned-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
parent 47541a60
...@@ -42,102 +42,191 @@ static const struct spi_nor_fixups w25q256_fixups = { ...@@ -42,102 +42,191 @@ static const struct spi_nor_fixups w25q256_fixups = {
}; };
static const struct flash_info winbond_nor_parts[] = { static const struct flash_info winbond_nor_parts[] = {
{ "w25x05", INFO(0xef3010, 0, 64 * 1024, 1) {
NO_SFDP_FLAGS(SECT_4K) }, .id = SNOR_ID(0xef, 0x30, 0x10),
{ "w25x10", INFO(0xef3011, 0, 64 * 1024, 2) .name = "w25x05",
NO_SFDP_FLAGS(SECT_4K) }, .size = SZ_64K,
{ "w25x20", INFO(0xef3012, 0, 64 * 1024, 4) .no_sfdp_flags = SECT_4K,
NO_SFDP_FLAGS(SECT_4K) }, }, {
{ "w25x40", INFO(0xef3013, 0, 64 * 1024, 8) .id = SNOR_ID(0xef, 0x30, 0x11),
NO_SFDP_FLAGS(SECT_4K) }, .name = "w25x10",
{ "w25x80", INFO(0xef3014, 0, 64 * 1024, 16) .size = SZ_128K,
NO_SFDP_FLAGS(SECT_4K) }, .no_sfdp_flags = SECT_4K,
{ "w25x16", INFO(0xef3015, 0, 64 * 1024, 32) }, {
NO_SFDP_FLAGS(SECT_4K) }, .id = SNOR_ID(0xef, 0x30, 0x12),
{ "w25q16dw", INFO(0xef6015, 0, 64 * 1024, 32) .name = "w25x20",
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .size = SZ_256K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .no_sfdp_flags = SECT_4K,
SPI_NOR_QUAD_READ) }, }, {
{ "w25x32", INFO(0xef3016, 0, 64 * 1024, 64) .id = SNOR_ID(0xef, 0x30, 0x13),
NO_SFDP_FLAGS(SECT_4K) }, .name = "w25x40",
{ "w25q16jv-im/jm", INFO(0xef7015, 0, 64 * 1024, 32) .size = SZ_512K,
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .no_sfdp_flags = SECT_4K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | }, {
SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0xef, 0x30, 0x14),
{ "w25q20cl", INFO(0xef4012, 0, 64 * 1024, 4) .name = "w25x80",
NO_SFDP_FLAGS(SECT_4K) }, .size = SZ_1M,
{ "w25q20bw", INFO(0xef5012, 0, 64 * 1024, 4) .no_sfdp_flags = SECT_4K,
NO_SFDP_FLAGS(SECT_4K) }, }, {
{ "w25q20ew", INFO(0xef6012, 0, 64 * 1024, 4) .id = SNOR_ID(0xef, 0x30, 0x15),
NO_SFDP_FLAGS(SECT_4K) }, .name = "w25x16",
{ "w25q32", INFO(0xef4016, 0, 64 * 1024, 64) .size = SZ_2M,
NO_SFDP_FLAGS(SECT_4K) }, .no_sfdp_flags = SECT_4K,
{ "w25q32dw", INFO(0xef6016, 0, 64 * 1024, 64) }, {
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .id = SNOR_ID(0xef, 0x60, 0x15),
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) .name = "w25q16dw",
OTP_INFO(256, 3, 0x1000, 0x1000) }, .size = SZ_2M,
{ "w25q32jv", INFO(0xef7016, 0, 64 * 1024, 64) .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | }, {
SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0xef, 0x30, 0x16),
{ "w25q32jwm", INFO(0xef8016, 0, 64 * 1024, 64) .name = "w25x32",
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .size = SZ_4M,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) .no_sfdp_flags = SECT_4K,
OTP_INFO(256, 3, 0x1000, 0x1000) }, }, {
{ "w25q64jwm", INFO(0xef8017, 0, 64 * 1024, 128) .id = SNOR_ID(0xef, 0x70, 0x15),
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .name = "w25q16jv-im/jm",
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .size = SZ_2M,
SPI_NOR_QUAD_READ) }, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
{ "w25q128jwm", INFO(0xef8018, 0, 64 * 1024, 256) .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, {
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .id = SNOR_ID(0xef, 0x40, 0x12),
SPI_NOR_QUAD_READ) }, .name = "w25q20cl",
{ "w25q256jwm", INFO(0xef8019, 0, 64 * 1024, 512) .size = SZ_256K,
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .no_sfdp_flags = SECT_4K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | }, {
SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0xef, 0x50, 0x12),
{ "w25x64", INFO(0xef3017, 0, 64 * 1024, 128) .name = "w25q20bw",
NO_SFDP_FLAGS(SECT_4K) }, .size = SZ_256K,
{ "w25q64", INFO(0xef4017, 0, 64 * 1024, 128) .no_sfdp_flags = SECT_4K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | }, {
SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0xef, 0x60, 0x12),
{ "w25q64dw", INFO(0xef6017, 0, 64 * 1024, 128) .name = "w25q20ew",
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .size = SZ_256K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .no_sfdp_flags = SECT_4K,
SPI_NOR_QUAD_READ) }, }, {
{ "w25q64jvm", INFO(0xef7017, 0, 64 * 1024, 128) .id = SNOR_ID(0xef, 0x40, 0x16),
NO_SFDP_FLAGS(SECT_4K) }, .name = "w25q32",
{ "w25q128fw", INFO(0xef6018, 0, 64 * 1024, 256) .size = SZ_4M,
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .no_sfdp_flags = SECT_4K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | }, {
SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0xef, 0x60, 0x16),
{ "w25q128jv", INFO(0xef7018, 0, 64 * 1024, 256) .name = "w25q32dw",
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) .size = SZ_4M,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
SPI_NOR_QUAD_READ) }, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
{ "w25q80", INFO(0xef5014, 0, 64 * 1024, 16) .otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
NO_SFDP_FLAGS(SECT_4K) }, }, {
{ "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16) .id = SNOR_ID(0xef, 0x70, 0x16),
NO_SFDP_FLAGS(SECT_4K) }, .name = "w25q32jv",
{ "w25q128", INFO(0xef4018, 0, 0, 0) .size = SZ_4M,
FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) }, .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
{ "w25q256", INFO(0xef4019, 0, 64 * 1024, 512) .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, {
.fixups = &w25q256_fixups }, .id = SNOR_ID(0xef, 0x80, 0x16),
{ "w25q256jvm", INFO(0xef7019, 0, 64 * 1024, 0) }, .name = "w25q32jwm",
{ "w25q256jw", INFO(0xef6019, 0, 64 * 1024, 512) .size = SZ_4M,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
SPI_NOR_QUAD_READ) }, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
{ "w25m512jv", INFO(0xef7119, 0, 64 * 1024, 1024) .otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_QUAD_READ | }, {
SPI_NOR_DUAL_READ) }, .id = SNOR_ID(0xef, 0x80, 0x17),
{ "w25q512nwq", INFO(0xef6020, 0, 0, 0) .name = "w25q64jwm",
OTP_INFO(256, 3, 0x1000, 0x1000) }, .size = SZ_8M,
{ "w25q512nwm", INFO(0xef8020, 0, 64 * 1024, 0) .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
OTP_INFO(256, 3, 0x1000, 0x1000) }, .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
{ "w25q512jvq", INFO(0xef4020, 0, 64 * 1024, 1024) }, {
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | .id = SNOR_ID(0xef, 0x80, 0x18),
SPI_NOR_QUAD_READ) }, .name = "w25q128jwm",
.size = SZ_16M,
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x80, 0x19),
.name = "w25q256jwm",
.size = SZ_32M,
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x30, 0x17),
.name = "w25x64",
.size = SZ_8M,
.no_sfdp_flags = SECT_4K,
}, {
.id = SNOR_ID(0xef, 0x40, 0x17),
.name = "w25q64",
.size = SZ_8M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x60, 0x17),
.name = "w25q64dw",
.size = SZ_8M,
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x70, 0x17),
.name = "w25q64jvm",
.size = SZ_8M,
.no_sfdp_flags = SECT_4K,
}, {
.id = SNOR_ID(0xef, 0x60, 0x18),
.name = "w25q128fw",
.size = SZ_16M,
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x70, 0x18),
.name = "w25q128jv",
.size = SZ_16M,
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x50, 0x14),
.name = "w25q80",
.size = SZ_1M,
.no_sfdp_flags = SECT_4K,
}, {
.id = SNOR_ID(0xef, 0x40, 0x14),
.name = "w25q80bl",
.size = SZ_1M,
.no_sfdp_flags = SECT_4K,
}, {
.id = SNOR_ID(0xef, 0x40, 0x18),
.name = "w25q128",
.flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
}, {
.id = SNOR_ID(0xef, 0x40, 0x19),
.name = "w25q256",
.size = SZ_32M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
.fixups = &w25q256_fixups,
}, {
.id = SNOR_ID(0xef, 0x70, 0x19),
.name = "w25q256jvm",
}, {
.id = SNOR_ID(0xef, 0x60, 0x19),
.name = "w25q256jw",
.size = SZ_32M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x71, 0x19),
.name = "w25m512jv",
.size = SZ_64M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0xef, 0x60, 0x20),
.name = "w25q512nwq",
.otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
}, {
.id = SNOR_ID(0xef, 0x80, 0x20),
.name = "w25q512nwm",
.otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
}, {
.id = SNOR_ID(0xef, 0x40, 0x20),
.name = "w25q512jvq",
.size = SZ_64M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
},
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment