[PATCH v2 4/5] mtd: spi-nor: move SPI_NOR_MAX_ADDR_WIDTH define to spi-nor.h
Jules Maselbas
jmaselbas at zdiv.net
Sat Aug 12 00:48:23 PDT 2023
From: Jules Maselbas <jmaselbas at kalray.eu>
Move the SPI_NOR_MAX_ADDR_WIDTH define into spi-nor.h to be used by
drivers.
Signed-off-by: Jules Maselbas <jmaselbas at kalray.eu>
---
drivers/mtd/spi-nor/spi-nor.c | 1 -
include/linux/mtd/spi-nor.h | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 968fd3ea7a..ab61e7824c 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -21,7 +21,6 @@
#include <of.h>
#define SPI_NOR_MAX_ID_LEN 6
-#define SPI_NOR_MAX_ADDR_WIDTH 4
/*
* For everything but full-chip erase; probably could be much smaller, but kept
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index fc7cefb55e..720b4888d4 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -142,6 +142,8 @@
SNOR_PROTO_ADDR(_addr_nbits) | \
SNOR_PROTO_DATA(_data_nbits))
+#define SPI_NOR_MAX_ADDR_WIDTH 4
+
enum spi_nor_protocol {
SNOR_PROTO_1_1_1 = SNOR_PROTO_STR(1, 1, 1),
SNOR_PROTO_1_1_2 = SNOR_PROTO_STR(1, 1, 2),
--
2.41.0
More information about the barebox
mailing list