From: Greg Ungerer <gerg@linux-m68k.org>
To: linux-m68k@lists.linux-m68k.org
Cc: arnd@kernel.org, Greg Ungerer <gerg@kernel.org>,
Greg Ungerer <gerg@linux-m68k.org>
Subject: [PATCH 2/7] m68k: coldfire: use ColdFire specific IO access in headers
Date: Thu, 30 Apr 2026 15:19:18 +1000 [thread overview]
Message-ID: <20260430052047.1827575-3-gerg@linux-m68k.org> (raw)
In-Reply-To: <20260430052047.1827575-1-gerg@linux-m68k.org>
From: Greg Ungerer <gerg@kernel.org>
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.
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
---
arch/m68k/include/asm/mcfgpio.h | 12 ++++++------
arch/m68k/include/asm/nettel.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h
index 9c91ecdafc45..7103cfa4edb6 100644
--- a/arch/m68k/include/asm/mcfgpio.h
+++ b/arch/m68k/include/asm/mcfgpio.h
@@ -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
diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h
index 9bf55cef119e..30bc915c3d97 100644
--- a/arch/m68k/include/asm/nettel.h
+++ b/arch/m68k/include/asm/nettel.h
@@ -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
--
2.54.0
next prev parent reply other threads:[~2026-04-30 5:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 5:19 m68k: coldfire: create internal register access defines Greg Ungerer
2026-04-30 5:19 ` [PATCH 1/7] m68k: coldfire: create IO access functions for internal registers Greg Ungerer
2026-04-30 7:13 ` Geert Uytterhoeven
2026-04-30 7:20 ` Arnd Bergmann
2026-04-30 11:10 ` Greg Ungerer
2026-04-30 5:19 ` Greg Ungerer [this message]
2026-04-30 5:19 ` [PATCH 3/7] m68k: coldfire: use ColdFire specifc IO access in interrupt code Greg Ungerer
2026-04-30 5:19 ` [PATCH 4/7] m68k: coldfire: use ColdFire specifc IO access in timer code Greg Ungerer
2026-04-30 5:19 ` [PATCH 5/7] m68k: coldfire: rename timer register access defines Greg Ungerer
2026-04-30 5:19 ` [PATCH 6/7] m68k: coldfire: use ColdFire specifc IO access in system code Greg Ungerer
2026-04-30 5:19 ` [PATCH 7/7] m68k: coldfire: use ColdFire specifc IO access in SoC code Greg Ungerer
2026-04-30 7:39 ` m68k: coldfire: create internal register access defines Arnd Bergmann
2026-04-30 11:22 ` Greg Ungerer
2026-04-30 11:37 ` Arnd Bergmann
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=20260430052047.1827575-3-gerg@linux-m68k.org \
--to=gerg@linux-m68k.org \
--cc=arnd@kernel.org \
--cc=gerg@kernel.org \
--cc=linux-m68k@lists.linux-m68k.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