[PATCH v2 2/5] m68k: Fix writew(), writel(), readw(), readl() endianness

Daniel Palmer daniel at thingy.jp
Wed Apr 8 14:49:14 CEST 2026


Hi Angelo.

On Wed, 8 Apr 2026 at 21:12, Angelo Dureghello <angelo at kernel-space.org> wrote:
> mmm, "currently broken" ?
> If you remove bigendian read/write the driver framework will fail
> to work with coldfire/m68k stuff.

I'm not sure who/what decided this but in Linux at least these are
meant to be read little endian and convert to cpu endian.
Classic m68k in linux works like that. Coldfire in Linux is currently
the same as u-boot on internal registers and but everything else has
the "correct" behaviour. I think that is so PCI can work.

> I tested the patchset over master in stmark2 board, seems this patch is
> breaking dspi cs init:

Thank you for checking and sorry for the breakage.

> Please find a different solution, that may be using "xxx_le" stuff directly
> from your code.

mmm so I did try that for nommu classic m68k in Linux because it's
also "broken" there and got told to fix readl() etc.

Would putting this in some #ifdefs so coldfire keeps the current
behaviour and classic m68k matches Linux be acceptable?

Thanks,

Daniel


More information about the U-Boot mailing list