public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>,
	Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Subject: [PATCH 2/8] arc: Move SYS_LITTLE_ENDIAN / SYS_BIG_ENDIAN selection to Kconfig
Date: Sun, 31 Jul 2022 21:08:23 -0400	[thread overview]
Message-ID: <20220801010829.3177443-2-trini@konsulko.com> (raw)
In-Reply-To: <20220801010829.3177443-1-trini@konsulko.com>

We can determine which of these we need given CPU_BIG_ENDIAN being
enabled or not, so move that logic to Kconfig from config.mk.

Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
This is not a size neutral patch as apparently before we were not fully
populating SYS_BIG_ENDIAN to all of the codebase, so testing this on
nsim_700be or nsim_hs38be would be a good idea.
---
 README             | 4 ----
 arch/Kconfig       | 2 ++
 arch/arc/config.mk | 6 ------
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/README b/README
index ebfdced4a725..ff0534137716 100644
--- a/README
+++ b/README
@@ -351,10 +351,6 @@ The following options need to be configured:
 		clocks to the sysclock, ddrclock and usbclock.
 
 - Generic CPU options:
-		CONFIG_SYS_BIG_ENDIAN, CONFIG_SYS_LITTLE_ENDIAN
-
-		Defines the endianess of the CPU. Implementation of those
-		values is arch specific.
 
 		CONFIG_SYS_FSL_DDR
 		Freescale DDR driver in use. This type of DDR controller is
diff --git a/arch/Kconfig b/arch/Kconfig
index 6495e780fec9..c4dc47dccb43 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -53,6 +53,8 @@ config ARC
 	select SUPPORT_OF_CONTROL
 	select SYS_CACHE_SHIFT_7
 	select TIMER
+	select SYS_BIG_ENDIAN if CPU_BIG_ENDIAN
+	select SYS_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
 
 config ARM
 	bool "ARM architecture"
diff --git a/arch/arc/config.mk b/arch/arc/config.mk
index 118472b2d0ba..2b70945ac342 100644
--- a/arch/arc/config.mk
+++ b/arch/arc/config.mk
@@ -2,12 +2,6 @@
 #
 # Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
 
-ifndef CONFIG_CPU_BIG_ENDIAN
-CONFIG_SYS_LITTLE_ENDIAN = 1
-else
-CONFIG_SYS_BIG_ENDIAN = 1
-endif
-
 ifdef CONFIG_SYS_LITTLE_ENDIAN
 KBUILD_LDFLAGS += -EL
 PLATFORM_CPPFLAGS += -mlittle-endian
-- 
2.25.1


  reply	other threads:[~2022-08-01  1:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  1:08 [PATCH 1/8] Convert CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS et al to Kconfig Tom Rini
2022-08-01  1:08 ` Tom Rini [this message]
2022-08-13  1:42   ` [PATCH 2/8] arc: Move SYS_LITTLE_ENDIAN / SYS_BIG_ENDIAN selection " Tom Rini
2022-08-01  1:08 ` [PATCH 3/8] Remove CONFIG_SYS_FSL_SCFG_IODSECR1_ADDR et al Tom Rini
2022-08-13  1:42   ` Tom Rini
2022-08-01  1:08 ` [PATCH 4/8] Convert CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE to Kconfig Tom Rini
2022-08-13  1:42   ` Tom Rini
2022-08-01  1:08 ` [PATCH 5/8] Convert CONFIG_SYS_FSL_MAX_NUM_OF_SEC " Tom Rini
2022-08-13  1:42   ` Tom Rini
2022-08-01  1:08 ` [PATCH 6/8] Convert CONFIG_SYS_FSL_NUM_CC_PLLS " Tom Rini
2022-08-13  1:42   ` Tom Rini
2022-08-01  1:08 ` [PATCH 7/8] Convert CONFIG_SYS_FSL_PCIE_COMPAT " Tom Rini
2022-08-13  1:42   ` Tom Rini
2022-08-01  1:08 ` [PATCH 8/8] Convert CONFIG_SYS_FSL_QMAN_V3 et al " Tom Rini
2022-08-13  1:43   ` Tom Rini
2022-08-13  1:42 ` [PATCH 1/8] Convert CONFIG_SYS_FSL_DDR_MAIN_NUM_CTRLS " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220801010829.3177443-2-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=alexey.brodkin@synopsys.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox