Re: [U-Boot] [PATCH] MIPS: fix endianess handling

On 12/4/11 9:02 PM, Daniel Schwierzeck wrote:
diff --git a/boards.cfg b/boards.cfg index c83d861..2cd917e 100644 --- a/boards.cfg +++ b/boards.cfg @@ -324,13 +324,13 @@ dbau1000 mips mips32 dbau1x00 - dbau1100 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1100 dbau1500 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1500 dbau1550 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1550 -dbau1550_el mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1550 +dbau1550_el mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1550,SYS_LITTLE_ENDIAN
This looks Ok.
gth2 mips mips32 - - au1x00 incaip mips mips32 incaip - incaip incaip_100MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=100000000 incaip_133MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=133000000 incaip_150MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=150000000 -pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000 +pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000,SYS_LITTLE_ENDIAN qemu_mips mips mips32 qemu-mips - - qemu-mips tb0229 mips mips32 vct_premium mips mips32 vct micronas - vct:VCT_PREMIUM
But I don't see any reason CONFIG_SYS_LITTLE_ENDIAN is specified in boards.cfg. Just putting it in configs/pb1000.h is enough, isn't it?
Shinya, do you have an opinion about this?
No, if it works for you, I'm fine. Thanks for tackling this issue. Does anyone disagree with this change? If not, I'll pick this up.
diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index e23865b..eab23b4 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -88,6 +88,10 @@ endif CFLAGS_NTR := $(call cc-option,-fno-toplevel-reorder) CFLAGS += $(CFLAGS_NTR)
+# Pass through endianess settings in LDFLAGS to LD
s/endianess/endianness/

Dear Shinya Kuribayashi,
In message 4EDB8475.1080305@pobox.com you wrote:
-pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000 +pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000,SYS_LITTLE_ENDIAN
...
But I don't see any reason CONFIG_SYS_LITTLE_ENDIAN is specified in boards.cfg. Just putting it in configs/pb1000.h is enough, isn't it?
Agreed. In almost all cases this should be done in the board config file only. Only if there are cases where a board suppors both LE and BE configurations (is there any such board??) then we should need a SYS_*_ENDIAN setting in boards.cfg (but even then, only one - not two).
Best regards,
Wolfgang Denk

On 12/04/2011 04:08 PM, Wolfgang Denk wrote:
Dear Shinya Kuribayashi,
In message4EDB8475.1080305@pobox.com you wrote:
-pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000 +pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000,SYS_LITTLE_ENDIAN
...
But I don't see any reason CONFIG_SYS_LITTLE_ENDIAN is specified in boards.cfg. Just putting it in configs/pb1000.h is enough, isn't it?
Agreed. In almost all cases this should be done in the board config file only. Only if there are cases where a board suppors both LE and BE configurations (is there any such board??) then we should need a SYS_*_ENDIAN setting in boards.cfg (but even then, only one - not two).
I did this because of dbau1550 and dbau1550_el. For the pb1000 I'll move it to the board config.
Best regards,
Wolfgang Denk

Dear Daniel Schwierzeck,
On 12/04/2011 04:08 PM, Wolfgang Denk wrote:
Dear Shinya Kuribayashi,
In message4EDB8475.1080305@pobox.com you wrote:
-pb1000 mips mips32 pb1x00
au1x00 pb1x00:PB1000 +pb1000
mips mips32 pb1x00 - au1x00 pb1x00:PB1000,SYS_LITTLE_ENDIAN
...
But I don't see any reason CONFIG_SYS_LITTLE_ENDIAN is specified in boards.cfg. Just putting it in configs/pb1000.h is enough, isn't it?
Agreed. In almost all cases this should be done in the board config file only. Only if there are cases where a board suppors both LE and BE configurations (is there any such board??) then we should need a SYS_*_ENDIAN setting in boards.cfg (but even then, only one - not two).
I did this because of dbau1550 and dbau1550_el. For the pb1000 I'll move it to the board config.
Best regards,
Wolfgang Denk
Will we see V2 of this patch please?
Best regards, Marek Vasut
participants (4)
-
Daniel Schwierzeck
-
Marek Vasut
-
Shinya Kuribayashi
-
Wolfgang Denk