projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d6c5d6
)
mtd: spi-nor: Add a macro to define more banks
author
Miquel Raynal
<miquel.raynal@bootlin.com>
Tue, 28 Mar 2023 15:40:59 +0000
(17:40 +0200)
committer
Tudor Ambarus
<tudor.ambarus@linaro.org>
Wed, 29 Mar 2023 10:46:07 +0000
(13:46 +0300)
Most of the chips on the market only feature a single bank. However, new
chips may support more than a single bank, with the possibility to
parallelize some operations. Let's introduce an INFOB() macro which also
takes a n_bank parameter.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Link:
https://lore.kernel.org/r/20230328154105.448540-3-miquel.raynal@bootlin.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.h
patch
|
blob
|
history
diff --git
a/drivers/mtd/spi-nor/core.h
b/drivers/mtd/spi-nor/core.h
index db0e458810c7720632353ada62ece1cc2f78795b..bf2e64671856d92465a21e50aab27c7219dd9b64 100644
(file)
--- a/
drivers/mtd/spi-nor/core.h
+++ b/
drivers/mtd/spi-nor/core.h
@@
-555,6
+555,10
@@
struct flash_info {
SPI_NOR_ID((_jedec_id), (_ext_id)), \
SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), 1),
+#define INFOB(_jedec_id, _ext_id, _sector_size, _n_sectors, _n_banks) \
+ SPI_NOR_ID((_jedec_id), (_ext_id)), \
+ SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), (_n_banks)),
+
#define INFO6(_jedec_id, _ext_id, _sector_size, _n_sectors) \
SPI_NOR_ID6((_jedec_id), (_ext_id)), \
SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), 1),