aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 6d03622d9965..1e08976ab028 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -467,6 +467,23 @@ err:
467 .flags = (_flags), \ 467 .flags = (_flags), \
468 }) 468 })
469 469
470#define INFO6(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
471 ((kernel_ulong_t)&(struct flash_info) { \
472 .id = { \
473 ((_jedec_id) >> 16) & 0xff, \
474 ((_jedec_id) >> 8) & 0xff, \
475 (_jedec_id) & 0xff, \
476 ((_ext_id) >> 16) & 0xff, \
477 ((_ext_id) >> 8) & 0xff, \
478 (_ext_id) & 0xff, \
479 }, \
480 .id_len = 6, \
481 .sector_size = (_sector_size), \
482 .n_sectors = (_n_sectors), \
483 .page_size = 256, \
484 .flags = (_flags), \
485 })
486
470#define CAT25_INFO(_sector_size, _n_sectors, _page_size, _addr_width, _flags) \ 487#define CAT25_INFO(_sector_size, _n_sectors, _page_size, _addr_width, _flags) \
471 ((kernel_ulong_t)&(struct flash_info) { \ 488 ((kernel_ulong_t)&(struct flash_info) { \
472 .sector_size = (_sector_size), \ 489 .sector_size = (_sector_size), \
@@ -565,6 +582,7 @@ static const struct spi_device_id spi_nor_ids[] = {
565 { "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) }, 582 { "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
566 { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) }, 583 { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
567 { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) }, 584 { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) },
585 { "s25fl128s", INFO6(0x012018, 0x4d0180, 64 * 1024, 256, SPI_NOR_QUAD_READ) },
568 { "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, 0) }, 586 { "s25fl129p0", INFO(0x012018, 0x4d00, 256 * 1024, 64, 0) },
569 { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, 0) }, 587 { "s25fl129p1", INFO(0x012018, 0x4d01, 64 * 1024, 256, 0) },
570 { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) }, 588 { "s25sl004a", INFO(0x010212, 0, 64 * 1024, 8, 0) },