Re: [PATCHv3 1/3] net: fec: do not use readl()/writel() for ColdFire
From: Michael Schmitz
Date: Wed Sep 23 2026 - 22:36:43 EST
Hi Andrew,
Am 24.09.2026 um 02:15 schrieb Andrew Lunn:
The driver will always need to support big and little endian hardware, so I
am not sure how to avoid some abstraction like this.
I was wondering if there is a linux standard set of macros which is
supposed to handle this big/little difference, the macro knows the
architecture and does the correct thing?
Knowing the architecture may not be enough - there may be multiple platforms within one architecture that need different address translation, different endianness, access quirks, the lot.
We'd need a 'bus' parameter in all these macros to avoid what's in current use in arch specific code (take a look at arch/m68k/include/asm/io_mm.h for what may be the worst case example. Don't do that on an empty stomach though...).
Like, use arch supplied functions if needed, fall through to the standard macros if no special handling required.
Cheers,
Michael