Skip to content

Commit 6ecc52e

Browse files
mwalleambarus
authored andcommitted
mtd: spi-nor: everspin: convert flash_info to new format
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-20-e60548861b10@kernel.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
1 parent 5a329c4 commit 6ecc52e

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

drivers/mtd/spi-nor/everspin.c

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,29 @@
99
#include "core.h"
1010

1111
static const struct flash_info everspin_nor_parts[] = {
12-
{ "mr25h128", CAT25_INFO(16 * 1024, 1, 256, 2) },
13-
{ "mr25h256", CAT25_INFO(32 * 1024, 1, 256, 2) },
14-
{ "mr25h10", CAT25_INFO(128 * 1024, 1, 256, 3) },
15-
{ "mr25h40", CAT25_INFO(512 * 1024, 1, 256, 3) },
12+
{
13+
.name = "mr25h128",
14+
.size = SZ_16K,
15+
.sector_size = SZ_16K,
16+
.addr_nbytes = 2,
17+
.flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
18+
}, {
19+
.name = "mr25h256",
20+
.size = SZ_32K,
21+
.sector_size = SZ_32K,
22+
.addr_nbytes = 2,
23+
.flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
24+
}, {
25+
.name = "mr25h10",
26+
.size = SZ_128K,
27+
.sector_size = SZ_128K,
28+
.flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
29+
}, {
30+
.name = "mr25h40",
31+
.size = SZ_512K,
32+
.sector_size = SZ_512K,
33+
.flags = SPI_NOR_NO_ERASE | SPI_NOR_NO_FR,
34+
}
1635
};
1736

1837
const struct spi_nor_manufacturer spi_nor_everspin = {

0 commit comments

Comments
 (0)