Thread (18 messages) 18 messages, 6 authors, 13d ago

Re: [PATCHv3 2/3] net: smc91x: do not use readw()/writew() on ColdFire platforms

flat view

From: "Arnd Bergmann" <arnd@kernel.org>
Date: 2026-09-23 21:31:52
Also in: imx, linux-can, linux-m68k, linux-spi, lkml

On Mon, Sep 7, 2026, at 15:37, Greg Ungerer wrote:
Modify the access macros and functions used to access the smsc hardware
registers when used on ColdFire SoC platforms so they do not use readw()
or writew(), or derived functions like ioread16be() and iowrite16be().

The current set of readX()/writeX() access methods for ColdFire have
historically been non-standard, in that they mostly access memory
big-endian instead of the expected little-endian. Before fixing the
ColdFire readX() and writeX() supporting code to properly work with
little-endian data existing driver uses need to be fixed. Convert the
smsc driver ColdFire uses of these to use the raw access macros - which
are well defined to be (native) big-endian on ColdFire. This change
requires some byte swapping at time of access to retain existing correct
behavior.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help