]> git.itanic.dy.fi Git - linux-stable/commitdiff
mtd: spi-nor: intel: convert flash_info to new format
authorMichael Walle <mwalle@kernel.org>
Fri, 8 Sep 2023 10:16:40 +0000 (12:16 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 19 Sep 2023 15:59:19 +0000 (18:59 +0300)
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-22-e60548861b10@kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/intel.c

index aba62759a02e0fd39de41f89c8a496d0e4a9a285..f647359fee7a8fe3ba98bb1f65180ea6719521a8 100644 (file)
@@ -9,12 +9,22 @@
 #include "core.h"
 
 static const struct flash_info intel_nor_parts[] = {
-       { "160s33b",  INFO(0x898911, 0, 64 * 1024,  32)
-               FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) },
-       { "320s33b",  INFO(0x898912, 0, 64 * 1024,  64)
-               FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) },
-       { "640s33b",  INFO(0x898913, 0, 64 * 1024, 128)
-               FLAGS(SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE) },
+       {
+               .id = SNOR_ID(0x89, 0x89, 0x11),
+               .name = "160s33b",
+               .size = SZ_2M,
+               .flags = SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE,
+       }, {
+               .id = SNOR_ID(0x89, 0x89, 0x12),
+               .name = "320s33b",
+               .size = SZ_4M,
+               .flags = SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE,
+       }, {
+               .id = SNOR_ID(0x89, 0x89, 0x13),
+               .name = "640s33b",
+               .size = SZ_8M,
+               .flags = SPI_NOR_HAS_LOCK | SPI_NOR_SWP_IS_VOLATILE,
+       }
 };
 
 const struct spi_nor_manufacturer spi_nor_intel = {