mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor: remove use-large-blocks left over
@ 2021-08-25 11:35 Marco Felsch
  0 siblings, 0 replies; only message in thread
From: Marco Felsch @ 2021-08-25 11:35 UTC (permalink / raw)
  To: barebox

Commit 8e3318b5bc ("mtd: spi-nor: introduce SPI 1-2-2 and SPI 1-4-4
protocols") added the spi_nor_select_erase() function. This function
don't take the use_large_blocks parameter into account anymore and
instead relies only on the Kconfig config.

This commit removes the left over 'use_large_blocks' and
'use-large-blocks' references to cleanup the code base and to avoid
confusion. No functional changes are made.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 Documentation/devicetree/bindings/mtd/m25p80.rst | 10 ----------
 drivers/mtd/devices/m25p80.c                     |  6 +-----
 drivers/mtd/spi-nor/spi-nor.c                    |  3 +--
 include/linux/mtd/spi-nor.h                      |  4 +---
 4 files changed, 3 insertions(+), 20 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/m25p80.rst

diff --git a/Documentation/devicetree/bindings/mtd/m25p80.rst b/Documentation/devicetree/bindings/mtd/m25p80.rst
deleted file mode 100644
index 09e8b8eff6..0000000000
--- a/Documentation/devicetree/bindings/mtd/m25p80.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-MTD SPI driver for ST M25Pxx (and similar) serial flash chips
-=============================================================
-
-Additionally to the Linux bindings in ``dts/Bindings/mtd/jedec,spi-nor.txt``
-the barebox driver has the following optional properties:
-
-- use-large-blocks : Use large blocks rather than the 4K blocks some devices
-                     support. 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.
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 8845ec3a3e..0685a61491 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -219,7 +219,6 @@ static int m25p_probe(struct device_d *dev)
 	};
 	const char			*flash_name = NULL;
 	int				device_id;
-	bool				use_large_blocks;
 	int ret;
 
 	data = dev->platform_data;
@@ -261,10 +260,7 @@ static int m25p_probe(struct device_d *dev)
 	else
 		flash_name = NULL; /* auto-detect */
 
-	use_large_blocks = of_property_read_bool(dev->device_node,
-			"use-large-blocks");
-
-	ret = spi_nor_scan(nor, flash_name, &hwcaps, use_large_blocks);
+	ret = spi_nor_scan(nor, flash_name, &hwcaps);
 	if (ret)
 		return ret;
 
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index bd748ff5b4..10f026d7c2 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1363,8 +1363,7 @@ static int spi_nor_setup(struct spi_nor *nor, const struct flash_info *info,
 }
 
 int spi_nor_scan(struct spi_nor *nor, const char *name,
-		 const struct spi_nor_hwcaps *hwcaps,
-		 bool use_large_blocks)
+		 const struct spi_nor_hwcaps *hwcaps)
 {
 	struct spi_nor_flash_parameter params;
 	const struct spi_device_id	*id = NULL;
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 1c6f442866..08c54baf02 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -302,7 +302,6 @@ struct spi_nor_hwcaps {
  * @nor:	the spi_nor structure
  * @name:	the chip type name
  * @hwcaps:	the hardware capabilities supported by the controller 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
@@ -313,7 +312,6 @@ struct spi_nor_hwcaps {
  * Return: 0 for success, others for failure.
  */
 int spi_nor_scan(struct spi_nor *nor, const char *name,
-		 const struct spi_nor_hwcaps *hwcaps,
-		 bool use_large_blocks);
+		 const struct spi_nor_hwcaps *hwcaps);
 
 #endif
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-25 11:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25 11:35 [PATCH] mtd: spi-nor: remove use-large-blocks left over Marco Felsch

mail archive of the barebox mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.barebox.org/barebox/0 barebox/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 barebox barebox/ https://lore.barebox.org/barebox \
		barebox@lists.infradead.org
	public-inbox-index barebox

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git