Re: m68k: coldfire: create internal register access defines

"Arnd Bergmann" <[email protected]>
Newsgroups org.kernel.vger.linux-m68k
Message-ID <[email protected]>
On Thu, Apr 30, 2026, at 07:19, Greg Ungerer wrote:
> 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.

These all look good to me,

Reviewed-by: Arnd Bergmann <[email protected]>

There are still open questions about how to continue from here
to change the existing readl() and ioread32be() style helpers
to have normal endianess and type characteristics without
breaking things, but this is a good step in that direction.

      Arnd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.