Commit 856f6179 authored by Michael Walle's avatar Michael Walle Committed by Tudor Ambarus

mtd: spi-nor: issi: 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-23-e60548861b10@kernel.orgSigned-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
parent 3de64047
...@@ -47,44 +47,86 @@ static const struct spi_nor_fixups pm25lv_nor_fixups = { ...@@ -47,44 +47,86 @@ static const struct spi_nor_fixups pm25lv_nor_fixups = {
}; };
static const struct flash_info issi_nor_parts[] = { static const struct flash_info issi_nor_parts[] = {
{ "is25cd512", INFO(0x7f9d20, 0, 32 * 1024, 2) {
NO_SFDP_FLAGS(SECT_4K) }, .id = SNOR_ID(0x7f, 0x9d, 0x20),
{ "is25lq040b", INFO(0x9d4013, 0, 64 * 1024, 8) .name = "is25cd512",
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, .sector_size = SZ_32K,
{ "is25lp016d", INFO(0x9d6015, 0, 64 * 1024, 32) .size = SZ_64K,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, .no_sfdp_flags = SECT_4K,
{ "is25lp080d", INFO(0x9d6014, 0, 64 * 1024, 16) }, {
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0x9d, 0x40, 0x13),
{ "is25lp032", INFO(0x9d6016, 0, 64 * 1024, 64) .name = "is25lq040b",
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, .size = SZ_512K,
{ "is25lp064", INFO(0x9d6017, 0, 64 * 1024, 128) .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, }, {
{ "is25lp128", INFO(0x9d6018, 0, 64 * 1024, 256) .id = SNOR_ID(0x9d, 0x60, 0x15),
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ) }, .name = "is25lp016d",
{ "is25lp256", INFO(0x9d6019, 0, 64 * 1024, 0) .size = SZ_2M,
FIXUP_FLAGS(SPI_NOR_4B_OPCODES) .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
.fixups = &is25lp256_fixups }, }, {
{ "is25wp032", INFO(0x9d7016, 0, 64 * 1024, 64) .id = SNOR_ID(0x9d, 0x60, 0x14),
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, .name = "is25lp080d",
{ "is25wp064", INFO(0x9d7017, 0, 64 * 1024, 128) .size = SZ_1M,
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,
{ "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256) }, {
NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, .id = SNOR_ID(0x9d, 0x60, 0x16),
{ "is25wp256", INFO(0x9d7019, 0, 0, 0) .name = "is25lp032",
FIXUP_FLAGS(SPI_NOR_4B_OPCODES) .size = SZ_4M,
FLAGS(SPI_NOR_QUAD_PP) .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ,
.fixups = &is25lp256_fixups }, }, {
.id = SNOR_ID(0x9d, 0x60, 0x17),
{ "pm25lv512", INFO0(32 * 1024, 2) .name = "is25lp064",
NO_SFDP_FLAGS(SECT_4K) .size = SZ_8M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ,
}, {
.id = SNOR_ID(0x9d, 0x60, 0x18),
.name = "is25lp128",
.size = SZ_16M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ,
}, {
.id = SNOR_ID(0x9d, 0x60, 0x19),
.name = "is25lp256",
.fixups = &is25lp256_fixups,
.fixup_flags = SPI_NOR_4B_OPCODES,
}, {
.id = SNOR_ID(0x9d, 0x70, 0x16),
.name = "is25wp032",
.size = SZ_4M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0x9d, 0x70, 0x17),
.size = SZ_8M,
.name = "is25wp064",
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0x9d, 0x70, 0x18),
.name = "is25wp128",
.size = SZ_16M,
.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
}, {
.id = SNOR_ID(0x9d, 0x70, 0x19),
.name = "is25wp256",
.flags = SPI_NOR_QUAD_PP,
.fixups = &is25lp256_fixups,
.fixup_flags = SPI_NOR_4B_OPCODES,
}, {
.name = "pm25lv512",
.sector_size = SZ_32K,
.size = SZ_64K,
.no_sfdp_flags = SECT_4K,
.fixups = &pm25lv_nor_fixups .fixups = &pm25lv_nor_fixups
}, }, {
{ "pm25lv010", INFO0(32 * 1024, 4) .name = "pm25lv010",
NO_SFDP_FLAGS(SECT_4K) .sector_size = SZ_32K,
.size = SZ_128K,
.no_sfdp_flags = SECT_4K,
.fixups = &pm25lv_nor_fixups .fixups = &pm25lv_nor_fixups
}, }, {
{ "pm25lq032", INFO(0x7f9d46, 0, 64 * 1024, 64) .id = SNOR_ID(0x7f, 0x9d, 0x46),
NO_SFDP_FLAGS(SECT_4K) }, .name = "pm25lq032",
.size = SZ_4M,
.no_sfdp_flags = SECT_4K,
}
}; };
static void issi_nor_default_init(struct spi_nor *nor) static void issi_nor_default_init(struct spi_nor *nor)
......
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