Message ID | 20221110155513.819798-4-miquel.raynal@bootlin.com |
---|---|
State | Superseded |
Delegated to: | Ambarus Tudor |
Headers | show |
Series | mtd: spi-nor: read while write support | expand |
On 10/11/22 04:55PM, Miquel Raynal wrote: > 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> > --- > drivers/mtd/spi-nor/core.h | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h > index 8a067d56c995..044d49d749e0 100644 > --- a/drivers/mtd/spi-nor/core.h > +++ b/drivers/mtd/spi-nor/core.h > @@ -553,6 +553,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),
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 8a067d56c995..044d49d749e0 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -553,6 +553,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),
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> --- drivers/mtd/spi-nor/core.h | 4 ++++ 1 file changed, 4 insertions(+)