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

Angelo Dureghello angelo at kernel-space.org
Wed Apr 8 15:26:19 CEST 2026


Hi Daniel,

On 4/8/26 14:49, Daniel Palmer wrote:
> 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.
> 
no problem.

>> 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?
> 

yes, thanks, please try to find a solution protecting coldfire for now.

I will try to understand better why Linux operates differently from u-boot,
i think pci was involved here but actually i don't remember, need to 
study this deeper.


> Thanks,
> 
> Daniel

Regards,
-- Angelo



More information about the U-Boot mailing list