[PATCH 2/8] mfd: ocelot: move SPI specific macros to ocelot-spi.c

Rasmus Villemoes posted 8 patches 9 months ago
[PATCH 2/8] mfd: ocelot: move SPI specific macros to ocelot-spi.c
Posted by Rasmus Villemoes 9 months ago
These are only used in and relevant to the SPI backend.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
---
 drivers/mfd/ocelot-spi.c | 9 +++++++++
 drivers/mfd/ocelot.h     | 9 ---------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/mfd/ocelot-spi.c b/drivers/mfd/ocelot-spi.c
index a320a613d00e1..97e4061e3dff7 100644
--- a/drivers/mfd/ocelot-spi.c
+++ b/drivers/mfd/ocelot-spi.c
@@ -41,6 +41,15 @@
 #define VSC7512_CHIP_REGS_RES_START	0x71070000
 #define VSC7512_CHIP_REGS_RES_SIZE	0x14
 
+#define OCELOT_SPI_BYTE_ORDER_LE 0x00000000
+#define OCELOT_SPI_BYTE_ORDER_BE 0x81818181
+
+#ifdef __LITTLE_ENDIAN
+#define OCELOT_SPI_BYTE_ORDER OCELOT_SPI_BYTE_ORDER_LE
+#else
+#define OCELOT_SPI_BYTE_ORDER OCELOT_SPI_BYTE_ORDER_BE
+#endif
+
 static const struct resource vsc7512_dev_cpuorg_resource =
 	DEFINE_RES_REG_NAMED(VSC7512_DEVCPU_ORG_RES_START,
 			     VSC7512_DEVCPU_ORG_RES_SIZE,
diff --git a/drivers/mfd/ocelot.h b/drivers/mfd/ocelot.h
index 4305e7a55cb1a..4f602611a5a86 100644
--- a/drivers/mfd/ocelot.h
+++ b/drivers/mfd/ocelot.h
@@ -35,13 +35,4 @@ struct ocelot_ddata {
 int ocelot_chip_reset(struct device *dev);
 int ocelot_core_init(struct device *dev);
 
-#define OCELOT_SPI_BYTE_ORDER_LE 0x00000000
-#define OCELOT_SPI_BYTE_ORDER_BE 0x81818181
-
-#ifdef __LITTLE_ENDIAN
-#define OCELOT_SPI_BYTE_ORDER OCELOT_SPI_BYTE_ORDER_LE
-#else
-#define OCELOT_SPI_BYTE_ORDER OCELOT_SPI_BYTE_ORDER_BE
-#endif
-
 #endif
-- 
2.49.0
Re: [PATCH 2/8] mfd: ocelot: move SPI specific macros to ocelot-spi.c
Posted by Colin Foster 9 months ago
On Wed, Mar 19, 2025 at 01:30:52PM +0100, Rasmus Villemoes wrote:
> [You don't often get email from ravi@prevas.dk. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> These are only used in and relevant to the SPI backend.
> 
> Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>

Reviewed-by: Colin Foster <colin.foster@in-advantage.com>