From: Ramon Fried Date: Mon, 24 Jun 2019 16:07:16 +0300 Subject: [U-Boot] [PATCH v7 9/9] net: macb: Fix check for little-endian system in gmac_configure_dma() In-Reply-To: References: <20190624040212.3726-1-anup.patel@wdc.com> <20190624040212.3726-10-anup.patel@wdc.com> <52450ee2-95bd-dfd2-f1a8-922a781600f5@gmail.com> Message-ID: <16abc7f3-3670-e58a-a105-9c4b1b29eda4@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.