Skip to content

Commit 8e52f54

Browse files
mwalleambarus
authored andcommitted
mtd: spi-nor: xilinx: use new macros in S3AN_INFO()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tudor Ambarus <[email protected]>
1 parent 348d772 commit 8e52f54

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

drivers/mtd/spi-nor/xilinx.c

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,22 @@
2121
SPI_MEM_OP_NO_DUMMY, \
2222
SPI_MEM_OP_DATA_IN(1, buf, 0))
2323

24-
#define S3AN_INFO(_jedec_id, _n_sectors, _page_size) \
25-
SPI_NOR_ID(_jedec_id, 0), \
26-
.size = 8 * (_page_size) * (_n_sectors), \
27-
.sector_size = (8 * (_page_size)), \
28-
.page_size = (_page_size), \
29-
.flags = SPI_NOR_NO_FR
24+
#define S3AN_FLASH(_id, _name, _n_sectors, _page_size) \
25+
.id = _id, \
26+
.name = _name, \
27+
.size = 8 * (_page_size) * (_n_sectors), \
28+
.sector_size = (8 * (_page_size)), \
29+
.page_size = (_page_size), \
30+
.flags = SPI_NOR_NO_FR
3031

3132
/* Xilinx S3AN share MFR with Atmel SPI NOR */
3233
static const struct flash_info xilinx_nor_parts[] = {
3334
/* Xilinx S3AN Internal Flash */
34-
{ "3S50AN", S3AN_INFO(0x1f2200, 64, 264) },
35-
{ "3S200AN", S3AN_INFO(0x1f2400, 256, 264) },
36-
{ "3S400AN", S3AN_INFO(0x1f2400, 256, 264) },
37-
{ "3S700AN", S3AN_INFO(0x1f2500, 512, 264) },
38-
{ "3S1400AN", S3AN_INFO(0x1f2600, 512, 528) },
35+
{ S3AN_FLASH(SNOR_ID(0x1f, 0x22, 0x00), "3S50AN", 64, 264) },
36+
{ S3AN_FLASH(SNOR_ID(0x1f, 0x24, 0x00), "3S200AN", 256, 264) },
37+
{ S3AN_FLASH(SNOR_ID(0x1f, 0x24, 0x00), "3S400AN", 256, 264) },
38+
{ S3AN_FLASH(SNOR_ID(0x1f, 0x25, 0x00), "3S700AN", 512, 264) },
39+
{ S3AN_FLASH(SNOR_ID(0x1f, 0x26, 0x00), "3S1400AN", 512, 528) },
3940
};
4041

4142
/*

0 commit comments

Comments
 (0)