[U-Boot] [PATCH v7 9/9] net: macb: Fix check for little-endian system in gmac_configure_dma()

Ramon Fried rfried.dev at gmail.com
Mon Jun 24 13:07:16 UTC 2019


On 6/24/19 4:02 PM, Daniel Schwierzeck wrote:
> can't you simply remove the non-DM part of the driver and add a
> device-tree property for the endianess?
>
> If that's not possible short-term, than maybe add a Kconfig symbol like this:
>
> config MACB_BIG_ENDIAN
>     bool "...."
>     depends on MACB
>     default y if SYS_BIG_ENDIAN
>     default n
>
> this way it's automatically sync'ed with
> CONFIG_SYS_LITTLE_ENDIAN/CONFIG_SYS_BIG_ENDIAN, but a board config
> could still override this setting.

I can even do better, Linux for instance automatically detects the endianess for the CPU
by writing to a scratch register on MACB HW and read it back.

But I don't understand the need for a specific board to define anything different than the SYS_ENDIANES for this driver.

Thanks,

Ramon.




More information about the U-Boot mailing list