]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
config: Use CONFIG_SYS_BIG_ENDIAN in code whenever possible
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Wed, 17 Jul 2024 08:07:03 +0000 (16:07 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 31 Jul 2024 17:18:37 +0000 (11:18 -0600)
So CONFIG_SYS_BIG_ENDIAN is our cross architecture option for
selecting machine endian, while the old CONFIG_CPU_BIG_ENDIAN
is defined by Arc only.

Use it whenever possible to ensure big endian code path is enabled
for all possible big endian machines.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Makefile
arch/arc/include/asm/arc-bcr.h
arch/arm/cpu/armv8/linux-kernel-image-header-vars.h
drivers/mtd/nand/raw/brcmnand/brcmnand.c
scripts/Makefile.build

index f5b2512f3690b59e51c65d658e5df93e3a1f2d4c..aa791426424f90e3ae52313e42d4c1f6de5e17b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1048,7 +1048,7 @@ endif
 CHECKFLAGS += --arch=$(ARCH)
 
 # insure the checker run with the right endianness
-CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
+CHECKFLAGS += $(if $(CONFIG_SYS_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
 
 # the checker needs the correct machine size
 CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)
index a6c972bf1e31b07c5f053ba61b468423cbb74717..d4de9b818c1a34b4a85027a5e3279cdfb62df84a 100644 (file)
@@ -15,7 +15,7 @@
 
 union bcr_di_cache {
        struct {
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
                unsigned int pad:12, line_len:4, sz:4, config:4, ver:8;
 #else
                unsigned int ver:8, config:4, sz:4, line_len:4, pad:12;
@@ -26,7 +26,7 @@ union bcr_di_cache {
 
 union bcr_slc_cfg {
        struct {
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
                unsigned int pad:24, way:2, lsz:2, sz:4;
 #else
                unsigned int sz:4, lsz:2, way:2, pad:24;
@@ -37,7 +37,7 @@ union bcr_slc_cfg {
 
 union bcr_generic {
        struct {
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
                unsigned int pad:24, ver:8;
 #else
                unsigned int ver:8, pad:24;
@@ -48,7 +48,7 @@ union bcr_generic {
 
 union bcr_clust_cfg {
        struct {
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
                unsigned int pad:7, c:1, num_entries:8, num_cores:8, ver:8;
 #else
                unsigned int ver:8, num_cores:8, num_entries:8, c:1, pad:7;
@@ -59,7 +59,7 @@ union bcr_clust_cfg {
 
 union bcr_mmu_4 {
        struct {
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
        unsigned int ver:8, sasid:1, sz1:4, sz0:4, res:2, pae:1,
                     n_ways:2, n_entry:2, n_super:2, u_itlb:3, u_dtlb:3;
 #else
index b6394aee16573f1eb3f2a86d79f6596b83626b8a..c6af825dbc7b52421f73bcdfc39abc4a2b6df59b 100644 (file)
@@ -31,7 +31,7 @@
  * when PIE is in effect. So we need to split them up in 32-bit high and low
  * words.
  */
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
 #define DATA_LE32(data)                                \
        ((((data) & 0x000000ff) << 24) |        \
         (((data) & 0x0000ff00) << 8)  |        \
@@ -55,7 +55,7 @@
 #endif
 #define __MEM_USAGE            (__CODE_DATA_SIZE + __MAX_EXTRA_RAM_USAGE)
 
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
 #define __HEAD_FLAG_BE         1
 #else
 #define __HEAD_FLAG_BE         0
index b7bf7cc0893d2e99bcbf1a15952044022f5c761a..b1af3f717d43b0414a5f2b0dbc26dfb2c9d2a4a4 100644 (file)
@@ -1698,7 +1698,7 @@ static int brcmnand_fill_dma_desc(struct brcmnand_host *host,
        desc->cmd_irq = (dma_cmd << 24) |
                (end ? (0x03 << 8) : 0) | /* IRQ | STOP */
                (!!begin) | ((!!end) << 1); /* head, tail */
-#ifdef CONFIG_CPU_BIG_ENDIAN
+#ifdef CONFIG_SYS_BIG_ENDIAN
        desc->cmd_irq |= 0x01 << 12;
 #endif
        desc->dram_addr = lower_32_bits(buf);
index 97dd4a64f6eff53a14117e93bff57bb5a5c61259..99cc29595b4a621029527b54495ee54263eda2a7 100644 (file)
@@ -224,7 +224,7 @@ recordmcount_source := $(srctree)/scripts/recordmcount.c \
                    $(srctree)/scripts/recordmcount.h
 else
 sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
-       "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
+       "$(if $(CONFIG_SYS_BIG_ENDIAN),big,little)" \
        "$(if $(CONFIG_64BIT),64,32)" \
        "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)" \
        "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \