mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] mtd: spi-nor: remove use-large-blocks left over
Date: Wed, 25 Aug 2021 13:35:25 +0200	[thread overview]
Message-ID: <20210825113525.5434-1-m.felsch@pengutronix.de> (raw)

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


                 reply	other threads:[~2021-08-25 11:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210825113525.5434-1-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox