From 3e1adbf832b8f420906e6d5cbf5bec7617545c7e Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 17 Oct 2014 14:46:11 +0200 Subject: 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 Signed-off-by: Philipp Zabel --- include/linux/mtd/spi-nor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.3