]> git.itanic.dy.fi Git - linux-stable/commitdiff
mtd: spi-nor: xilinx: use new macros in S3AN_INFO()
authorMichael Walle <mwalle@kernel.org>
Fri, 8 Sep 2023 10:16:47 +0000 (12:16 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Tue, 19 Sep 2023 15:59:20 +0000 (18:59 +0300)
There won't be any new entries, nor are the entries that much different
and the very odd page and sector sizes make the new format hard to read.
Therefore, convert the old S3AN_INFO() macro.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-29-e60548861b10@kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/xilinx.c

index 8d4539e32dfe0ac2aeebea9b261e08335c6accd9..f99118c691b03e860050c789e18404b6f09af5d4 100644 (file)
                   SPI_MEM_OP_NO_DUMMY,                                 \
                   SPI_MEM_OP_DATA_IN(1, buf, 0))
 
-#define S3AN_INFO(_jedec_id, _n_sectors, _page_size)                   \
-               SPI_NOR_ID(_jedec_id, 0),                               \
-               .size = 8 * (_page_size) * (_n_sectors),                \
-               .sector_size = (8 * (_page_size)),                      \
-               .page_size = (_page_size),                              \
-               .flags = SPI_NOR_NO_FR
+#define S3AN_FLASH(_id, _name, _n_sectors, _page_size)         \
+       .id = _id,                                              \
+       .name = _name,                                          \
+       .size = 8 * (_page_size) * (_n_sectors),                \
+       .sector_size = (8 * (_page_size)),                      \
+       .page_size = (_page_size),                              \
+       .flags = SPI_NOR_NO_FR
 
 /* Xilinx S3AN share MFR with Atmel SPI NOR */
 static const struct flash_info xilinx_nor_parts[] = {
        /* Xilinx S3AN Internal Flash */
-       { "3S50AN", S3AN_INFO(0x1f2200, 64, 264) },
-       { "3S200AN", S3AN_INFO(0x1f2400, 256, 264) },
-       { "3S400AN", S3AN_INFO(0x1f2400, 256, 264) },
-       { "3S700AN", S3AN_INFO(0x1f2500, 512, 264) },
-       { "3S1400AN", S3AN_INFO(0x1f2600, 512, 528) },
+       { S3AN_FLASH(SNOR_ID(0x1f, 0x22, 0x00), "3S50AN", 64, 264) },
+       { S3AN_FLASH(SNOR_ID(0x1f, 0x24, 0x00), "3S200AN", 256, 264) },
+       { S3AN_FLASH(SNOR_ID(0x1f, 0x24, 0x00), "3S400AN", 256, 264) },
+       { S3AN_FLASH(SNOR_ID(0x1f, 0x25, 0x00), "3S700AN", 512, 264) },
+       { S3AN_FLASH(SNOR_ID(0x1f, 0x26, 0x00), "3S1400AN", 512, 528) },
 };
 
 /*