public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@kernel.org>
To: "Greg Ungerer" <gerg@linux-m68k.org>, linux-m68k@lists.linux-m68k.org
Subject: Re: m68k: coldfire: create internal register access defines
Date: Thu, 30 Apr 2026 13:37:08 +0200	[thread overview]
Message-ID: <209d0653-6386-4b64-9e15-e358f84453ab@app.fastmail.com> (raw)
In-Reply-To: <476d1913-b9dd-4462-956a-a2f2fe8c9a24@linux-m68k.org>

On Thu, Apr 30, 2026, at 13:22, Greg Ungerer wrote:
> On 30/4/26 17:39, Arnd Bergmann wrote:
>
>> 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.
>
> I have been playing with one idea. I have been working through the affected
> drivers and changing them to use raw primitives only for their IO access
> on ColdFire (so only the __raw_readx/__raw_writex macros). My thinking is
> that these can then be pushed via driver subsystem maintainers if and when
> they are ready. When all are affected drivers are fixed then we can correct
> the definitions in arch/m68k/include/asm/io_no.h. At a later time if we choose
> we can then make changes to effected drivers again to use the now corrected
> readx/writex family.
>
> At least this way we can keep everything working and avoid a single patch that
> makes changes to io_no.h and drivers across multiple subsystems in one go.
> What do you think?

I think that should work for most of them, but perhaps not for the
spi-fsl-dspi with its extra abstraction through regmap-mmio.

I would probably still do an atomic change for that one, adding
the explict regmap endianess flag at the same time as redefining
the readl() function. As long as it's only one or two drivers that
need this, the change should still be simple enough to merge with
the respective subsystem maintainer Ack.

> So far I have modified the fec and smc91x ethernet drivers in this way.
> That was strait forward, though I may get a little resistance in the fec
> driver since I abstracted the IO access from readl/writel to local internal
> functions to keep it clean and avoid redefining readl/wrtel. But the change
> is simple in concept. I am working through the handful of other drivers
> that we identified.

Ok.

     Arnd

      reply	other threads:[~2026-04-30 11:37 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 ` [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 message]

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=209d0653-6386-4b64-9e15-e358f84453ab@app.fastmail.com \
    --to=arnd@kernel.org \
    --cc=gerg@linux-m68k.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