mtd: spi-nor: Introduce the concept of bank
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 28 Mar 2023 15:40:58 +0000 (17:40 +0200)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 29 Mar 2023 10:46:07 +0000 (13:46 +0300)
commit9d6c5d64f0288a814d4435b7da39e360a4c39e40
tree207d9102c227dae51057508347ec47ad9389932d
parent6afcc84080c415df81765c6d773edcba8fc30f6c
mtd: spi-nor: Introduce the concept of bank

SPI NOR chips are made of pages, which gathered in small groups make
(erase) sectors. Sectors, gathered together, make banks inside the
chip. Until now, there was only one bank per device supported, but we
are about to introduce support for new chips featuring several banks (up
to 4 so far) where different operations may happen in parallel.

Let's allow describing these additional bank parameters, and let's do
this independently of any other value (like the number of sectors) with
an absolute value.

By default we consider that all chips have a single bank.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Link: https://lore.kernel.org/r/20230328154105.448540-2-miquel.raynal@bootlin.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.c
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/xilinx.c