diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-10-17 14:46:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-08-26 15:14:00 +0200 |
commit | 3e1adbf832b8f420906e6d5cbf5bec7617545c7e (patch) | |
tree | 28f7de3e43ee9021c312e05209e8b1b060b86a60 /include | |
parent | f38ba32965c5686c062884fab2e9f505015af82a (diff) | |
download | barebox-3e1adbf832b8f420906e6d5cbf5bec7617545c7e.tar.gz barebox-3e1adbf832b8f420906e6d5cbf5bec7617545c7e.tar.xz |
mtd: m25p80: make it possible to use large blocks if desired
Some SPI NOR flashes support 4K erase blocks. 4K erase blocks do not
work with UBIFS which needs a minimum erase block size of 15360 bytes.
Also bigger sectors are faster to erase. This patch adds a device tree
option to use the bigger blocks instead of the default 4K blocks.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index f099406c53..bd2b16dd2a 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -190,6 +190,7 @@ struct spi_nor { * @nor: the spi_nor structure * @name: the chip type name * @mode: the read mode supported by the driver + * @use_large_blocks: prefer large blocks even if 4k blocks are supported * * The drivers can use this fuction to scan the SPI NOR. * In the scanning, it will try to get all the necessary information to @@ -199,6 +200,7 @@ struct spi_nor { * * Return: 0 for success, others for failure. */ -int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode); +int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode, + bool use_large_blocks); #endif |