[PATCH 2/3] spi: rockchip: Drop unused and broken CR0 macros

John Madieu john.madieu at gmail.com
Sat Apr 25 02:29:35 PDT 2026


Two CTRLR0 macros are defined but never referenced, and both are wrong:

 - CR0_XFM_MASK shifts by SPI_XFM_OFFSET, which does not exist anywhere
   in the tree. The intended symbol is CR0_XFM_OFFSET.

 - CR0_MTM_OFFSET is defined as 0x21, i.e. bit 33 of a 32-bit register.
   The value is meaningless and the macro is unused.

Drop both. They can be re-introduced correctly when an actual user
appears.

Signed-off-by: John Madieu <john.madieu at gmail.com>
---
 drivers/spi/spi-rockchip.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index de39f5da62cb..231fbcf0e7aa 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -98,7 +98,6 @@
 #define CR0_FRF_MICROWIRE			0x2
 
 #define CR0_XFM_OFFSET				18
-#define CR0_XFM_MASK				(0x03 << SPI_XFM_OFFSET)
 #define CR0_XFM_TR					0x0
 #define CR0_XFM_TO					0x1
 #define CR0_XFM_RO					0x2
@@ -109,8 +108,6 @@
 
 #define CR0_SOI_OFFSET				23
 
-#define CR0_MTM_OFFSET				0x21
-
 /* Bit fields in SER, 2bit */
 #define SER_MASK					0x3
 
-- 
2.25.1




More information about the Linux-rockchip mailing list