public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* m68k: coldfire: create internal register access defines
@ 2026-04-30  5:19 Greg Ungerer
  2026-04-30  5:19 ` [PATCH 1/7] m68k: coldfire: create IO access functions for internal registers Greg Ungerer
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Greg Ungerer @ 2026-04-30  5:19 UTC (permalink / raw)
  To: linux-m68k; +Cc: arnd, Greg Ungerer


The readx/writex family of IO access functions for ColdFire are
non-standard. They return native endian data for multi-byte access,
which on m68k/ColdFire is big-endian byte order. A number of places
need fixing to change readx/writex to be more standard - a lot of
the CPU/SoC architecture specific code and a number of drivers.

The existing ColdFire CPU/SoC architecture code is inconsistent in
how it accesses SoC hardware module registers. Both readx/writex
and __raw_readx/__raw_writex are used across the code base. To clean
this up this set of patches moves to an internal set of access
defines for the CPU/SoC architecture code. The following are defined
and used for all internal register access:

    8 bit read  -->  mcf_read8
    8 bit write -->  mcf_write8
   16 bit read  -->  mcf_read16
   16 bit write -->  mcf_write16
   32 bit read  -->  mcf_read32
   32 bit write -->  mcf_write32

To ease review I have broken the changes up a little, grouping major
blocks together instead of one huge patch.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
---
 arch/m68k/coldfire/clk.c        |    8 +-
 arch/m68k/coldfire/device.c     |    8 +-
 arch/m68k/coldfire/dma_timer.c  |   12 +--
 arch/m68k/coldfire/intc-2.c     |   30 ++++-----
 arch/m68k/coldfire/intc-5249.c  |   10 +--
 arch/m68k/coldfire/intc-525x.c  |   12 +--
 arch/m68k/coldfire/intc-5272.c  |   20 +++---
 arch/m68k/coldfire/intc-simr.c  |   38 ++++++------
 arch/m68k/coldfire/intc.c       |   28 ++++-----
 arch/m68k/coldfire/m5206.c      |    2
 arch/m68k/coldfire/m520x.c      |   26 ++++----
 arch/m68k/coldfire/m523x.c      |   12 +--
 arch/m68k/coldfire/m5249.c      |   16 ++---
 arch/m68k/coldfire/m525x.c      |   12 +--
 arch/m68k/coldfire/m5272.c      |   16 ++---
 arch/m68k/coldfire/m527x.c      |   40 ++++++-------
 arch/m68k/coldfire/m528x.c      |   28 ++++-----
 arch/m68k/coldfire/m5307.c      |    2
 arch/m68k/coldfire/m53xx.c      |  122 ++++++++++++++++++++--------------------
 arch/m68k/coldfire/m5407.c      |    2
 arch/m68k/coldfire/m5441x.c     |   12 +--
 arch/m68k/coldfire/m54xx.c      |   18 ++---
 arch/m68k/coldfire/nettel.c     |   16 ++---
 arch/m68k/coldfire/pci.c        |   56 +++++++++---------
 arch/m68k/coldfire/pit.c        |   20 +++---
 arch/m68k/coldfire/reset.c      |    4 -
 arch/m68k/coldfire/sltimers.c   |   18 ++---
 arch/m68k/coldfire/stmark2.c    |   12 +--
 arch/m68k/coldfire/timers.c     |   38 ++++++------
 arch/m68k/include/asm/io_no.h   |   16 +++++
 arch/m68k/include/asm/mcfgpio.h |   12 +--
 arch/m68k/include/asm/nettel.h  |    4 -


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-04-30 11:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/7] m68k: coldfire: use ColdFire specific IO access in headers Greg Ungerer
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox