]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
m68k: coldfire: use ColdFire specific IO access in headers
authorGreg Ungerer <gerg@linux-m68k.org>
Fri, 17 Apr 2026 13:44:41 +0000 (23:44 +1000)
committerGreg Ungerer <gerg@kernel.org>
Mon, 8 Jun 2026 03:15:18 +0000 (13:15 +1000)
Convert all m68k/ColdFire specific header file code to only use the
newly created internal register access methods. This is replacing the
mixed and inconsistent use of readx/writex and __raw_readx/__raw_writex
for internal SoC registers.

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/include/asm/mcfgpio.h
arch/m68k/include/asm/nettel.h

index 9c91ecdafc45392055da5f6c771162398a41a7bb..7103cfa4edb6c3dcb6bd33f105c66bba5234f4d6 100644 (file)
@@ -95,8 +95,8 @@ static inline void gpio_free(unsigned gpio)
 
 #define MCFGPIO_PORTTYPE               u8
 #define MCFGPIO_PORTSIZE               8
-#define mcfgpio_read(port)             __raw_readb(port)
-#define mcfgpio_write(data, port)      __raw_writeb(data, port)
+#define mcfgpio_read(port)             mcf_read8(port)
+#define mcfgpio_write(data, port)      mcf_write8(data, port)
 
 #elif defined(CONFIG_M5307) || defined(CONFIG_M5407) || defined(CONFIG_M5272)
 
@@ -104,8 +104,8 @@ static inline void gpio_free(unsigned gpio)
 
 #define MCFGPIO_PORTTYPE               u16
 #define MCFGPIO_PORTSIZE               16
-#define mcfgpio_read(port)             __raw_readw(port)
-#define mcfgpio_write(data, port)      __raw_writew(data, port)
+#define mcfgpio_read(port)             mcf_read16(port)
+#define mcfgpio_write(data, port)      mcf_write16(data, port)
 
 #elif defined(CONFIG_M5249) || defined(CONFIG_M525x)
 
@@ -113,8 +113,8 @@ static inline void gpio_free(unsigned gpio)
 
 #define MCFGPIO_PORTTYPE               u32
 #define MCFGPIO_PORTSIZE               32
-#define mcfgpio_read(port)             __raw_readl(port)
-#define mcfgpio_write(data, port)      __raw_writel(data, port)
+#define mcfgpio_read(port)             mcf_read32(port)
+#define mcfgpio_write(data, port)      mcf_write32(data, port)
 
 #endif
 
index 9bf55cef119e2e985474751cd7ff43c3c7f42630..30bc915c3d979453ddb6d2d0d514987c64ecdc29 100644 (file)
@@ -87,12 +87,12 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
  */
 static __inline__ unsigned int mcf_getppdata(void)
 {
-       return readw(MCFSIM_PBDAT);
+       return mcf_read16(MCFSIM_PBDAT);
 }
 
 static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 {
-       writew((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
+       mcf_write16((mcf_read16(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
 }
 #endif