IXP: Make IXP compile with arm-linux-gnueabi- and fix it
Subsystems (2)
cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (6):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPU
Makefile | 12 ------------ arch/arm/cpu/ixp/config.mk | 3 +++ arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/nand.c | 9 ++++++--- board/prodrive/pdnb3/pdnb3.c | 3 --- boards.cfg | 2 ++ examples/standalone/Makefile | 2 +- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 20 files changed, 25 insertions(+), 36 deletions(-)
Signature · 1 line
1.7.9
PATCH 1/6 Examples: Properly append LDFLAGS to LD command
The LD command in examples/standalone/Makefile ignored platform specific LDFLAGS setup. Pass these LDFLAGS to the command.
--- examples/standalone/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
examples/standalone/Makefile +1 -1
@@ -96,7 +96,7 @@ $(LIB): $(obj).depend $(LIBOBJS) $(ELF): $(obj)%: $(obj)%.o $(LIB) - $(LD) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ + $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ -L$(gcclibdir) -lgcc
Signature · 1 line
1.7.9
PATCH 2/6 IXP: Make IXP buildable with arm-linux- toolchains
In reply to Marek VasutAdd -EB flag to LD to switch endianness of the linker. This should make armeb targets buildable again. Also, make use of U-Boot's internal libgcc instead of toolchain's one, this works around the use of libraries from GCC, which might be little endian.
--- arch/arm/cpu/ixp/config.mk | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/cpu/ixp/config.mk +3 -0
@@ -28,6 +28,9 @@ PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 +PLATFORM_LDFLAGS += -EB +USE_PRIVATE_LIBGCC = yes + # -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error PLATFORM_RELFLAGS += -ffunction-sections LDFLAGS_u-boot += --gc-sections
Signature · 1 line
1.7.9
PATCH 3/6 IXP: Fix missing MACH_TYPE_{ACTUX?, PNB3, DVLHOST}
In reply to Marek VasutThese symbols are no longer defined in Linux-ARM's mach-types files. Replace these with CONFIG_MACH_TYPE instead.
--- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/pdnb3.c | 3 --- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 12 files changed, 12 insertions(+), 13 deletions(-)
board/actux1/actux1.c +0 -2
@@ -59,8 +59,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX1 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/actux2/actux2.c +0 -2
@@ -59,8 +59,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX2 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/actux3/actux3.c +0 -2
@@ -57,8 +57,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX3 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/actux4/actux4.c +0 -2
@@ -54,8 +54,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX4 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/dvlhost/dvlhost.c +0 -2
@@ -46,8 +46,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_DVLHOST ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/prodrive/pdnb3/pdnb3.c +0 -3
@@ -46,9 +46,6 @@ static unsigned long old_val = 0;*/ int board_init (void ) { -/* arch number of PDNB3 */ - gd->bd->bi_arch_number =MACH_TYPE_PDNB3 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
include/configs/actux1.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX1 1 +#define CONFIG_MACH_TYPE 1479 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/actux2.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX2 1 +#define CONFIG_MACH_TYPE 1480 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/actux3.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX3 1 +#define CONFIG_MACH_TYPE 1481 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/actux4.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX4 1 +#define CONFIG_MACH_TYPE 1532 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/dvlhost.h +2 -0
@@ -30,6 +30,8 @@#define CONFIG_IXP425 1#define CONFIG_DVLHOST 1 +#define CONFIG_MACH_TYPE 1343 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/pdnb3.h +2 -0
@@ -33,6 +33,8 @@#define CONFIG_IXP425 1/* This is an IXP425 CPU */ #define CONFIG_PDNB3 1/* on an PDNB3 board */ +#define CONFIG_MACH_TYPE 1002 +#define CONFIG_DISPLAY_CPUINFO 1/* display cpu info (and speed) */ #define CONFIG_DISPLAY_BOARDINFO 1/* display board info */
Signature · 1 line
1.7.9
PATCH 4/6 IXP: Squash warnings in IXP NPE
In reply to Marek VasutIxEthAcc.c: In function ?ixEthAccInit?:
IxEthAcc.c:105:21: warning: comparison between ?IxEthDBStatus? and ?enum <anonymous>? [-Wenum-compare] IxEthDBAPISupport.c: In function ?ixEthDBPortAddressSet?:
IxEthDBAPISupport.c:633:18: warning: variable ?ackPortAddressLock? set but not used [-Wunused-but-set-variable] IxQMgrDispatcher.c: In function ?ixQMgrLLPShow?:
IxQMgrDispatcher.c:1194:18: warning: variable ?q? set but not used [-Wunused-but-set-variable]
--- arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- 3 files changed, 1 insertions(+), 7 deletions(-)
arch/arm/cpu/ixp/npe/IxEthAcc.c +1 -1
@@ -102,7 +102,7 @@ PUBLIC IxEthAccStatus ixEthAccInit()/* * Initialize Control plane */ -if (ixEthDBInit () !=IX_ETH_ACC_SUCCESS ) +if (ixEthDBInit () !=IX_ETH_DB_SUCCESS ) {IX_ETH_ACC_WARNING_LOG ("ixEthAccInit: EthDB init failed\n" ,0 ,0 ,0 ,0 ,0 ,0 );
arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c +0 -3
@@ -630,7 +630,6 @@ IX_ETH_DB_PUBLICIxEthDBStatus ixEthDBPortAddressSet (IxEthDBPortId portID,IxEthDBMacAddr *macAddr) {IxNpeMhMessage message; -IxOsalMutex *ackPortAddressLock;IX_STATUS result;/* use this macro instead CHECK_PORT
@@ -644,8 +643,6 @@ IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddreturn IX_ETH_DB_PORT_UNINITIALIZED ; } - ackPortAddressLock = &ixEthDBPortInfo[portID].npeAckLock; -/* Operation stops here when Ethernet Learning is not enabled */ if (IX_FEATURE_CTRL_SWCONFIG_DISABLED ==ixFeatureCtrlSwConfigurationCheck (IX_FEATURECTRL_ETH_LEARNING ))
arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c +0 -3
@@ -1191,7 +1191,6 @@ ixQMgrLLPShow (int resetStats) {#ifndef NDEBUG UINT8 i =0 ; -IxQMgrQInfo *q;UINT32 intEnableRegVal =0 ;printf ("Livelock statistics are printed on the fly.\n" );
@@ -1200,8 +1199,6 @@ ixQMgrLLPShow (int resetStats)for (i=0 ; i<=IX_QMGR_MAX_LOW_QUE_TABLE_INDEX ; i++) { - q = &dispatchQInfo[i]; -if (ixQMgrQTypes[i] !=IX_QMGR_TYPE_REALTIME_OTHER ) {printf (" %2d " , i);
Signature · 1 line
1.7.9
PATCH 5/6 IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
In reply to Marek Vasut--- Makefile | 12 ------------ boards.cfg | 2 ++ 2 files changed, 2 insertions(+), 12 deletions(-)
Makefile +0 -12
@@ -678,18 +678,6 @@ SX1_config: unconfig @$(MKCONFIG) -n $@ SX1 arm arm925t sx1 ######################################################################### -## XScale Systems -######################################################################### - -pdnb3_config \ -scpu_config: unconfig - @mkdir -p $(obj)include - @if [ "$(findstring scpu_,$@)" ] ; then \ - echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ - fi - @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive - -######################################################################### ## ARM1176 Systems ######################################################################### smdk6400_noUSB_config \
boards.cfg +2 -0
@@ -244,6 +244,8 @@ actux2 arm ixp actux3 arm ixp actux4 arm ixp dvlhost arm ixp +pdnb3 arm ixp pdnb3 prodrive +scpu arm ixp pdnb3 prodrive - pdnb3:SCPU balloon3 arm pxa lubbock arm pxa palmld arm pxa
Signature · 1 line
1.7.9
PATCH 6/6 IXP: Fix NAND build warning on PDNB3 and SCPU
In reply to Marek Vasutnand.c: In function ?pdnb3_nand_read_buf?:
nand.c:107:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] nand.c: In function ?pdnb3_nand_dev_ready?:
nand.c:124:18: warning: variable ?val? set but not used [-Wunused-but-set-variable]
--- board/prodrive/pdnb3/nand.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
board/prodrive/pdnb3/nand.c +6 -3
@@ -100,11 +100,14 @@ static void pdnb3_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)for (i =0 ; i < len; i++) buf[i] =readb (&(pdnb3_ndfc->data)); }else { -ulong *ptr = (ulong *)buf; +uint32_t data;int count = len >>2 ; -for (i =0 ; i < count; i++) - *ptr++ =readl (&(pdnb3_ndfc->data)); +for (i =0 ; i < count; i++) { + data =readl (&pdnb3_ndfc->data); +memcpy (buf, &data,4 ); + buf +=4 ; + } } }
Signature · 1 line
1.7.9
PATCH 6/6 IXP: Fix NAND build warning on PDNB3 and SCPU
Quoted 24 lines · Marek Vasut
nand.c: In function ?pdnb3_nand_read_buf?:
nand.c:107:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]nand.c: In function ?pdnb3_nand_dev_ready?:
nand.c:124:18: warning: variable ?val? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>Cc Bryan Hundven <[email protected]>Cc Michael Schwingen <[email protected]>--- board/prodrive/pdnb3/nand.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)board/prodrive/pdnb3/nand.c +1
-1@@ -100,11 +100,14 @@ static void pdnb3_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)for (i =0 ; i < len; i++) buf[i] =readb (&(pdnb3_ndfc->data)); }else { -ulong *ptr = (ulong *)buf; +uint32_t data;int count = len >>2 ;
board/prodrive/pdnb3/nand.c static void pdnb3_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) · line 113
Quoted 10 lines
board/prodrive/pdnb3/nand.c +5
-2-for (i =0 ; i < count; i++) - *ptr++ =readl (&(pdnb3_ndfc->data)); +for (i =0 ; i < count; i++) { + data =readl (&pdnb3_ndfc->data); +memcpy (buf, &data,4 ); + buf +=4 ; + } } }
Any reason this isn't in drivers/mtd/nand?
-Scott
PATCH 6/6 IXP: Fix NAND build warning on PDNB3 and SCPU
Dear Scott Wood,
Quoted 42 lines · Marek Vasut
Quoted 41 lines
nand.c: In function ?pdnb3_nand_read_buf?:
nand.c:107:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]nand.c: In function ?pdnb3_nand_dev_ready?:
nand.c:124:18: warning: variable ?val? set but not used [-Wunused-but-set-variable]Signed-off-by Marek Vasut <[email protected]>Cc Bryan Hundven <[email protected]>Cc Michael Schwingen <[email protected]>---
board/prodrive/pdnb3/nand.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)board/prodrive/pdnb3/nand.c +6
-3@@ -100,11 +100,14 @@ static void pdnb3_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)for (i =0 ; i < len; i++) buf[i] =readb (&(pdnb3_ndfc->data)); }else { -ulong *ptr = (ulong *)buf; +uint32_t data;int count = len >>2 ; -for (i =0 ; i < count; i++) - *ptr++ =readl (&(pdnb3_ndfc->data)); +for (i =0 ; i < count; i++) { + data =readl (&pdnb3_ndfc->data); +memcpy (buf, &data,4 ); + buf +=4 ; + }
Quoted 7 lines
Quoted 3 lines
}
}
Any reason this isn't in
drivers/mtd/nand?-Scott
Don't ask me ... and it's similar with IXP NPE ethernet :-(
Best regards,
Marek Vasut
cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
In reply to Marek VasutQuoted 34 lines
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (6):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU fromMakefileto boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPUMakefile | 12 ------------ arch/arm/cpu/ixp/config.mk | 3 +++ arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/nand.c | 9 ++++++--- board/prodrive/pdnb3/pdnb3.c | 3 --- boards.cfg | 2 ++ examples/standalone/Makefile | 2 +- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 20 files changed, 25 insertions(+), 36 deletions(-)
Quoted 2 lines
Cc Bryan Hundven <[email protected]>Cc Michael Schwingen <[email protected]>
Can you guys please verify if after applying these patches, IXP builds with your armeb toolchains?
Also, can you please try if binaries built with usual arm-linux-gnueabi- toolchain (linaro, codesourcery whatever ...) now produce bootable result (this is very important, I'd be happy if they did so we can get rid of that whole armeb compiler stuff)?
Thanks in advance!
Best regards,
Marek Vasut
cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
Quoted 36 lines · Marek Vasut
Quoted 34 lines
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (6):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU fromMakefileto boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPUMakefile | 12 ------------ arch/arm/cpu/ixp/config.mk | 3 +++ arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/nand.c | 9 ++++++--- board/prodrive/pdnb3/pdnb3.c | 3 --- boards.cfg | 2 ++ examples/standalone/Makefile | 2 +- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 20 files changed, 25 insertions(+), 36 deletions(-)Quoted 2 lines
Cc Bryan Hundven<[email protected]>Cc Michael Schwingen<[email protected]>
Quoted 7 lines
Can you guys please verify if after applying these patches, IXP builds with your armeb toolchains?
Also, can you please try if binaries built with usual arm-linux-gnueabi- toolchain (linaro, codesourcery whatever ...) now produce bootable result (this is very important, I'd be happy if they did so we can get rid of that whole armeb compiler stuff)?
Sure, but this might take me some weeks. Thanks for the effort!
cu
Michael
cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
Dear Michael Schwingen,
Quoted 46 lines · Marek Vasut
Quoted 37 lines
Quoted 34 lines
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (6):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU fromMakefileto boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPUMakefile | 12 ------------ arch/arm/cpu/ixp/config.mk | 3 +++ arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/nand.c | 9 ++++++--- board/prodrive/pdnb3/pdnb3.c | 3 --- boards.cfg | 2 ++ examples/standalone/Makefile | 2 +- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 20 files changed, 25 insertions(+), 36 deletions(-)Quoted 2 lines
Cc Bryan Hundven<[email protected]>Cc Michael Schwingen<[email protected]>Quoted 7 lines
Can you guys please verify if after applying these patches, IXP builds with your armeb toolchains?
Also, can you please try if binaries built with usual arm-linux-gnueabi- toolchain (linaro, codesourcery whatever ...) now produce bootable result (this is very important, I'd be happy if they did so we can get rid of that whole armeb compiler stuff)?
Quoted 4 lines
Sure, but this might take me some weeks. Thanks for the effort!
cu
Michael
so I'll push these upstream and you'll let me know if something got broken later, this fix is better than nothing, ok?
Best regards,
Marek Vasut
cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
Quoted 50 lines · Marek Vasut
Dear Michael Schwingen,
Quoted 47 lines · Marek Vasut
Quoted 46 lines
Quoted 35 lines
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (6):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU fromMakefileto boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPUMakefile | 12 ------------ arch/arm/cpu/ixp/config.mk | 3 +++ arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/nand.c | 9 ++++++--- board/prodrive/pdnb3/pdnb3.c | 3 --- boards.cfg | 2 ++ examples/standalone/Makefile | 2 +- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 20 files changed, 25 insertions(+), 36 deletions(-)Quoted 3 lines
Cc Bryan Hundven<[email protected]>Cc Michael Schwingen<[email protected]>Can you guys please verify if after applying these patches, IXP builds with your armeb toolchains?
Also, can you please try if binaries built with usual arm-linux-gnueabi- toolchain (linaro, codesourcery whatever ...) now produce bootable result (this is very important, I'd be happy if they did so we can get rid of that whole armeb compiler stuff)?
Quoted 8 lines
Quoted 5 lines
Sure, but this might take me some weeks. Thanks for the effort!
cu
Michaelso I'll push these upstream and you'll let me know if something got broken later, this fix is better than nothing, ok?
Fine with me. Is upstream master or pxa/ixp?
cu
Michael
cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
In reply to Marek VasutQuoted 32 lines · Marek Vasut
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (6):
?Examples: Properly append LDFLAGS to LD command ?IXP: Make IXP buildable with arm-linux- toolchains ?IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST} ?IXP: Squash warnings in IXP NPE
?IXP: Move PDNB3 and SCPU fromMakefileto boards.cfg ?IXP: Fix NAND build warning on PDNB3 and SCPU?Makefile ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? 12 ------------ ?arch/arm/cpu/ixp/config.mk ? ? ? ? ? ? ? | ? ?3 +++ ?arch/arm/cpu/ixp/npe/IxEthAcc.c ? ? ? ? ?| ? ?2 +- ?arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | ? ?3 --- ?arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c ?| ? ?3 --- ?board/actux1/actux1.c ? ? ? ? ? ? ? ? ? ?| ? ?2 -- ?board/actux2/actux2.c ? ? ? ? ? ? ? ? ? ?| ? ?2 -- ?board/actux3/actux3.c ? ? ? ? ? ? ? ? ? ?| ? ?2 -- ?board/actux4/actux4.c ? ? ? ? ? ? ? ? ? ?| ? ?2 -- ?board/dvlhost/dvlhost.c ? ? ? ? ? ? ? ? ?| ? ?2 -- ?board/prodrive/pdnb3/nand.c ? ? ? ? ? ? ?| ? ?9 ++++++--- ?board/prodrive/pdnb3/pdnb3.c ? ? ? ? ? ? | ? ?3 --- ?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?2 ++ ?examples/standalone/Makefile ? ? ? ? ? ? | ? ?2 +- ?include/configs/actux1.h ? ? ? ? ? ? ? ? | ? ?2 ++ ?include/configs/actux2.h ? ? ? ? ? ? ? ? | ? ?2 ++ ?include/configs/actux3.h ? ? ? ? ? ? ? ? | ? ?2 ++ ?include/configs/actux4.h ? ? ? ? ? ? ? ? | ? ?2 ++ ?include/configs/dvlhost.h ? ? ? ? ? ? ? ?| ? ?2 ++ ?include/configs/pdnb3.h ? ? ? ? ? ? ? ? ?| ? ?2 ++
Quoted 8 lines
?20 files changed, 25 insertions(+), 36 deletions(-)
Cc Bryan Hundven <[email protected]>Cc Michael Schwingen <[email protected]>--
1.7.9
Marek,
I don't feel like I need to be cc'd on this.
I was just trying to help Michael get a newer crosstool-ng based armeb toolchain to test with.
/me returns to lurking
-Bryan
v2 cover IXP: Make IXP compile with arm-linux-gnueabi- and fix it
In reply to Marek VasutFrom: Marek Vasut <[email protected]>
This series of patches makes ARM/IXP platform compile with usual arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with gcc4.6.
Marek Vasut (7):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPU
IXP: Fix GPIO_INT_ACT_LOW_SET()
Makefile | 12 ------------ arch/arm/cpu/ixp/config.mk | 3 +++ arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- arch/arm/include/asm/arch-ixp/ixp425.h | 10 ++++++++-- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/nand.c | 16 +++------------- board/prodrive/pdnb3/pdnb3.c | 3 --- boards.cfg | 2 ++ examples/standalone/Makefile | 2 +- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 21 files changed, 30 insertions(+), 48 deletions(-)
V2: Fix remaining issues in nand.c and actux4
Signature · 1 line
1.7.9
PATCH RESEND v2 1/7 Examples: Properly append LDFLAGS to LD command
The LD command in examples/standalone/Makefile ignored platform specific LDFLAGS setup. Pass these LDFLAGS to the command.
--- examples/standalone/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
examples/standalone/Makefile +1 -1
@@ -96,7 +96,7 @@ $(LIB): $(obj).depend $(LIBOBJS) $(ELF): $(obj)%: $(obj)%.o $(LIB) - $(LD) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ + $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ -L$(gcclibdir) -lgcc
Signature · 1 line
1.7.9
PATCH RESEND v2 2/7 IXP: Make IXP buildable with arm-linux- toolchains
In reply to Marek VasutAdd -EB flag to LD to switch endianness of the linker. This should make armeb targets buildable again. Also, make use of U-Boot's internal libgcc instead of toolchain's one, this works around the use of libraries from GCC, which might be little endian.
--- arch/arm/cpu/ixp/config.mk | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/cpu/ixp/config.mk +3 -0
@@ -28,6 +28,9 @@ PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 +PLATFORM_LDFLAGS += -EB +USE_PRIVATE_LIBGCC = yes + # -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error PLATFORM_RELFLAGS += -ffunction-sections LDFLAGS_u-boot += --gc-sections
Signature · 1 line
1.7.9
PATCH RESEND v2 3/7 IXP: Fix missing MACH_TYPE_{ACTUX?, PNB3, DVLHOST}
In reply to Marek VasutThese symbols are no longer defined in Linux-ARM's mach-types files. Replace these with CONFIG_MACH_TYPE instead.
--- board/actux1/actux1.c | 2 -- board/actux2/actux2.c | 2 -- board/actux3/actux3.c | 2 -- board/actux4/actux4.c | 2 -- board/dvlhost/dvlhost.c | 2 -- board/prodrive/pdnb3/pdnb3.c | 3 --- include/configs/actux1.h | 2 ++ include/configs/actux2.h | 2 ++ include/configs/actux3.h | 2 ++ include/configs/actux4.h | 2 ++ include/configs/dvlhost.h | 2 ++ include/configs/pdnb3.h | 2 ++ 12 files changed, 12 insertions(+), 13 deletions(-)
board/actux1/actux1.c +0 -2
@@ -59,8 +59,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX1 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/actux2/actux2.c +0 -2
@@ -59,8 +59,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX2 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/actux3/actux3.c +0 -2
@@ -57,8 +57,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX3 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/actux4/actux4.c +0 -2
@@ -54,8 +54,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_ACTUX4 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/dvlhost/dvlhost.c +0 -2
@@ -46,8 +46,6 @@ int board_early_init_f(void)int board_init (void ) { - gd->bd->bi_arch_number =MACH_TYPE_DVLHOST ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
board/prodrive/pdnb3/pdnb3.c +0 -3
@@ -46,9 +46,6 @@ static unsigned long old_val = 0;*/ int board_init (void ) { -/* arch number of PDNB3 */ - gd->bd->bi_arch_number =MACH_TYPE_PDNB3 ; -/* adress of boot parameters */ gd->bd->bi_boot_params =0x00000100 ;
include/configs/actux1.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX1 1 +#define CONFIG_MACH_TYPE 1479 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/actux2.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX2 1 +#define CONFIG_MACH_TYPE 1480 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/actux3.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX3 1 +#define CONFIG_MACH_TYPE 1481 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/actux4.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_IXP425 1#define CONFIG_ACTUX4 1 +#define CONFIG_MACH_TYPE 1532 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/dvlhost.h +2 -0
@@ -30,6 +30,8 @@#define CONFIG_IXP425 1#define CONFIG_DVLHOST 1 +#define CONFIG_MACH_TYPE 1343 +#define CONFIG_DISPLAY_CPUINFO 1#define CONFIG_DISPLAY_BOARDINFO 1
include/configs/pdnb3.h +2 -0
@@ -33,6 +33,8 @@#define CONFIG_IXP425 1/* This is an IXP425 CPU */ #define CONFIG_PDNB3 1/* on an PDNB3 board */ +#define CONFIG_MACH_TYPE 1002 +#define CONFIG_DISPLAY_CPUINFO 1/* display cpu info (and speed) */ #define CONFIG_DISPLAY_BOARDINFO 1/* display board info */
Signature · 1 line
1.7.9
PATCH RESEND v2 4/7 IXP: Squash warnings in IXP NPE
In reply to Marek VasutIxEthAcc.c: In function ?ixEthAccInit?:
IxEthAcc.c:105:21: warning: comparison between ?IxEthDBStatus? and ?enum <anonymous>? [-Wenum-compare] IxEthDBAPISupport.c: In function ?ixEthDBPortAddressSet?:
IxEthDBAPISupport.c:633:18: warning: variable ?ackPortAddressLock? set but not used [-Wunused-but-set-variable] IxQMgrDispatcher.c: In function ?ixQMgrLLPShow?:
IxQMgrDispatcher.c:1194:18: warning: variable ?q? set but not used [-Wunused-but-set-variable]
--- arch/arm/cpu/ixp/npe/IxEthAcc.c | 2 +- arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c | 3 --- arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c | 3 --- 3 files changed, 1 insertions(+), 7 deletions(-)
arch/arm/cpu/ixp/npe/IxEthAcc.c +1 -1
@@ -102,7 +102,7 @@ PUBLIC IxEthAccStatus ixEthAccInit()/* * Initialize Control plane */ -if (ixEthDBInit () !=IX_ETH_ACC_SUCCESS ) +if (ixEthDBInit () !=IX_ETH_DB_SUCCESS ) {IX_ETH_ACC_WARNING_LOG ("ixEthAccInit: EthDB init failed\n" ,0 ,0 ,0 ,0 ,0 ,0 );
arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c +0 -3
@@ -630,7 +630,6 @@ IX_ETH_DB_PUBLICIxEthDBStatus ixEthDBPortAddressSet (IxEthDBPortId portID,IxEthDBMacAddr *macAddr) {IxNpeMhMessage message; -IxOsalMutex *ackPortAddressLock;IX_STATUS result;/* use this macro instead CHECK_PORT
@@ -644,8 +643,6 @@ IxEthDBStatus ixEthDBPortAddressSet(IxEthDBPortId portID, IxEthDBMacAddr *macAddreturn IX_ETH_DB_PORT_UNINITIALIZED ; } - ackPortAddressLock = &ixEthDBPortInfo[portID].npeAckLock; -/* Operation stops here when Ethernet Learning is not enabled */ if (IX_FEATURE_CTRL_SWCONFIG_DISABLED ==ixFeatureCtrlSwConfigurationCheck (IX_FEATURECTRL_ETH_LEARNING ))
arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c +0 -3
@@ -1191,7 +1191,6 @@ ixQMgrLLPShow (int resetStats) {#ifndef NDEBUG UINT8 i =0 ; -IxQMgrQInfo *q;UINT32 intEnableRegVal =0 ;printf ("Livelock statistics are printed on the fly.\n" );
@@ -1200,8 +1199,6 @@ ixQMgrLLPShow (int resetStats)for (i=0 ; i<=IX_QMGR_MAX_LOW_QUE_TABLE_INDEX ; i++) { - q = &dispatchQInfo[i]; -if (ixQMgrQTypes[i] !=IX_QMGR_TYPE_REALTIME_OTHER ) {printf (" %2d " , i);
Signature · 1 line
1.7.9
PATCH RESEND v2 5/7 IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
In reply to Marek Vasut--- Makefile | 12 ------------ boards.cfg | 2 ++ 2 files changed, 2 insertions(+), 12 deletions(-)
Makefile +0 -12
@@ -678,18 +678,6 @@ SX1_config: unconfig @$(MKCONFIG) -n $@ SX1 arm arm925t sx1 ######################################################################### -## XScale Systems -######################################################################### - -pdnb3_config \ -scpu_config: unconfig - @mkdir -p $(obj)include - @if [ "$(findstring scpu_,$@)" ] ; then \ - echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ - fi - @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive - -######################################################################### ## ARM1176 Systems ######################################################################### smdk6400_noUSB_config \
boards.cfg +2 -0
@@ -244,6 +244,8 @@ actux2 arm ixp actux3 arm ixp actux4 arm ixp dvlhost arm ixp +pdnb3 arm ixp pdnb3 prodrive +scpu arm ixp pdnb3 prodrive - pdnb3:SCPU balloon3 arm pxa lubbock arm pxa palmld arm pxa
Signature · 1 line
1.7.9
PATCH v2 6/7 IXP: Fix NAND build warning on PDNB3 and SCPU
In reply to Marek Vasutnand.c: In function ?pdnb3_nand_read_buf?:
nand.c:107:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] nand.c: In function ?pdnb3_nand_dev_ready?:
nand.c:124:18: warning: variable ?val? set but not used [-Wunused-but-set-variable]
Remove the 4-byte-at-time read mode altogether, the most is bogus and will likely cause unaligned accesses.
--- board/prodrive/pdnb3/nand.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-)
V2: Drop the 4 byte access altogether, fix readb() call
board/prodrive/pdnb3/nand.c +3 -13
@@ -96,16 +96,8 @@ static void pdnb3_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) {int i; -if (len %4 ) { -for (i =0 ; i < len; i++) - buf[i] =readb (&(pdnb3_ndfc->data)); - }else { -ulong *ptr = (ulong *)buf; -int count = len >>2 ; - -for (i =0 ; i < count; i++) - *ptr++ =readl (&(pdnb3_ndfc->data)); - } +for (i =0 ; i < len; i++) + buf[i] =readb (&(pdnb3_ndfc->data)); }static int pdnb3_nand_verify_buf (struct mtd_info *mtd,const u_char *buf,int len)
@@ -121,12 +113,10 @@ static int pdnb3_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int lestatic int pdnb3_nand_dev_ready (struct mtd_info *mtd) { -volatile u_char val; -/* * Blocking read to wait for NAND to be ready */ - val =readb (&(pdnb3_ndfc->wait)); +readb (&(pdnb3_ndfc->wait));/* * Return always true
Signature · 1 line
1.7.9
PATCH v2 7/7 IXP: Fix GPIO_INT_ACT_LOW_SET()
In reply to Marek VasutFrom: Marek Vasut <[email protected]>
The GPIO_INT_ACT_LOW_SET was incorrectly handling interrupt lines higher than 7. This is due to the fact that there are two registers for total of 16 lines.
--- arch/arm/include/asm/arch-ixp/ixp425.h | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-ixp/ixp425.h +8 -2
@@ -358,6 +358,9 @@#define IXP425_GPIO_GPCLKR IXP425_GPIO_REG(IXP425_GPIO_GPCLKR_OFFSET)#define IXP425_GPIO_GPDBSELR IXP425_GPIO_REG(IXP425_GPIO_GPDBSELR_OFFSET) +#define IXP425_GPIO_GPITR (line) (((line) >= 8) ? \ + IXP425_GPIO_GPIT2R : IXP425_GPIO_GPIT1R) +/* * Macros to make it easy to access the GPIO registers */
@@ -365,8 +368,11 @@#define GPIO_OUTPUT_DISABLE (line) *IXP425_GPIO_GPOER |= (1 << (line))#define GPIO_OUTPUT_SET (line) *IXP425_GPIO_GPOUTR |= (1 << (line))#define GPIO_OUTPUT_CLEAR (line) *IXP425_GPIO_GPOUTR &= ~(1 << (line)) -#define GPIO_INT_ACT_LOW_SET (line) *IXP425_GPIO_GPIT1R = \ - (*IXP425_GPIO_GPIT1R & ~(0x7 << (line * 3))) | (0x1 << (line * 3)) +#define GPIO_INT_ACT_LOW_SET (line) \ + *IXP425_GPIO_GPITR(line) = \ + (*IXP425_GPIO_GPITR(line) & \ + ~(0x7 << (((line) & 0x7) * 3))) | \ + (0x1 << (((line) & 0x7) * 3)) \/* * Constants to make it easy to access Timer Control/Status registers
Signature · 1 line
1.7.9