Re: [U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk

2012-08-25 Thread Mike Frysinger
On Thursday 23 August 2012 18:50:47 daniel.schwierz...@gmail.com wrote:
> From: Daniel Schwierzeck 
> 
> This is CPU independent and should be configured architecture-wide.

nice
Acked-by: Mike Frysinger 
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] MIPS: factor out endianess flag handling to arch config.mk

2012-08-23 Thread daniel . schwierzeck
From: Daniel Schwierzeck 

This is CPU independent and should be configured architecture-wide.

Signed-off-by: Daniel Schwierzeck 
---
 arch/mips/config.mk| 20 ++--
 arch/mips/cpu/mips32/config.mk | 19 +--
 arch/mips/cpu/xburst/config.mk |  3 +--
 include/configs/qi_lb60.h  |  1 +
 4 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index 6ab8acd..b680256 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -23,6 +23,22 @@
 
 CROSS_COMPILE ?= mips_4KC-
 
+# Handle special prefix in ELDK 4.0 toolchain
+ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
+ENDIANNESS := -EL
+endif
+
+ifdef CONFIG_SYS_LITTLE_ENDIAN
+ENDIANNESS := -EL
+endif
+
+ifdef CONFIG_SYS_BIG_ENDIAN
+ENDIANNESS := -EB
+endif
+
+# Default to EB if no endianess is configured
+ENDIANNESS ?= -EB
+
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x8020 -T mips.lds
 
 PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
@@ -47,8 +63,8 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
 # On the other hand, we want PIC in the U-Boot code to relocate it from ROM
 # to RAM. $28 is always used as gp.
 #
-PLATFORM_CPPFLAGS  += -G 0 -mabicalls -fpic
+PLATFORM_CPPFLAGS  += -G 0 -mabicalls -fpic $(ENDIANNESS)
 PLATFORM_CPPFLAGS  += -msoft-float
-PLATFORM_LDFLAGS   += -G 0 -static -n -nostdlib
+PLATFORM_LDFLAGS   += -G 0 -static -n -nostdlib $(ENDIANNESS)
 PLATFORM_RELFLAGS  += -ffunction-sections -fdata-sections
 LDFLAGS_FINAL  += --gc-sections
diff --git a/arch/mips/cpu/mips32/config.mk b/arch/mips/cpu/mips32/config.mk
index a1cd590..a0e4de5 100644
--- a/arch/mips/cpu/mips32/config.mk
+++ b/arch/mips/cpu/mips32/config.mk
@@ -29,21 +29,4 @@
 #
 MIPSFLAGS := -march=mips32r2
 
-# Handle special prefix in ELDK 4.0 toolchain
-ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
-ENDIANNESS := -EL
-endif
-
-ifdef CONFIG_SYS_LITTLE_ENDIAN
-ENDIANNESS := -EL
-endif
-
-ifdef CONFIG_SYS_BIG_ENDIAN
-ENDIANNESS := -EB
-endif
-
-# Default to EB if no endianess is configured
-ENDIANNESS ?= -EB
-
-PLATFORM_CPPFLAGS += $(MIPSFLAGS) $(ENDIANNESS)
-PLATFORM_LDFLAGS += $(ENDIANNESS)
+PLATFORM_CPPFLAGS += $(MIPSFLAGS)
diff --git a/arch/mips/cpu/xburst/config.mk b/arch/mips/cpu/xburst/config.mk
index bce0c1b..18d49ab 100644
--- a/arch/mips/cpu/xburst/config.mk
+++ b/arch/mips/cpu/xburst/config.mk
@@ -20,5 +20,4 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_CPPFLAGS += -march=mips32 -EL
-PLATFORM_LDFLAGS += -EL
+PLATFORM_CPPFLAGS += -march=mips32
diff --git a/include/configs/qi_lb60.h b/include/configs/qi_lb60.h
index a3fc465..4bb5bbc 100644
--- a/include/configs/qi_lb60.h
+++ b/include/configs/qi_lb60.h
@@ -11,6 +11,7 @@
 #define __CONFIG_QI_LB60_H
 
 #define CONFIG_MIPS32  /* MIPS32 CPU core */
+#define CONFIG_SYS_LITTLE_ENDIAN
 #define CONFIG_JZSOC   /* Jz SoC */
 #define CONFIG_JZ4740  /* Jz4740 SoC */
 #define CONFIG_NAND_JZ4740
-- 
1.7.11.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot