diff mbox

[U-Boot,v2] MIPS: tb0229: fix compile errors

Message ID 1323621577-13010-1-git-send-email-daniel.schwierzeck@googlemail.com
State Accepted
Headers show

Commit Message

Daniel Schwierzeck Dec. 11, 2011, 4:39 p.m. UTC
This board breaks MAKEALL -a mips due to compile errors.
This patch fixes only the parts causing the errors to get MAKEALL
working.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
---
Changes for v2:
 - removed fixes for coding style cleanup and compiler warnings

Note: minimal patch to get MAKEALL -a mips working. This board is broken
and has no maintainer so it should be dropped.

 board/tb0229/flash.c      |    1 -
 board/tb0229/tb0229.c     |    1 +
 board/tb0229/vr4131-pci.c |    2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

Comments

Wolfgang Denk Dec. 12, 2011, 7:19 a.m. UTC | #1
Dear Daniel Schwierzeck,

In message <1323621577-13010-1-git-send-email-daniel.schwierzeck@googlemail.com> you wrote:
> This board breaks MAKEALL -a mips due to compile errors.
> This patch fixes only the parts causing the errors to get MAKEALL
> working.
> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> ---
> Changes for v2:
>  - removed fixes for coding style cleanup and compiler warnings
> 
> Note: minimal patch to get MAKEALL -a mips working. This board is broken
> and has no maintainer so it should be dropped.
> 
>  board/tb0229/flash.c      |    1 -
>  board/tb0229/tb0229.c     |    1 +
>  board/tb0229/vr4131-pci.c |    2 +-
>  3 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
Wolfgang Denk Dec. 12, 2011, 7:32 a.m. UTC | #2
Dear Daniel Schwierzeck,

In message <1323621577-13010-1-git-send-email-daniel.schwierzeck@googlemail.com> you wrote:
> This board breaks MAKEALL -a mips due to compile errors.
> This patch fixes only the parts causing the errors to get MAKEALL
> working.
> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> ---
> Changes for v2:
>  - removed fixes for coding style cleanup and compiler warnings
> 
> Note: minimal patch to get MAKEALL -a mips working. This board is broken
> and has no maintainer so it should be dropped.

I suggest we drop it.  You patch does not really fix it.  With GCC 4.6
I get anothe rton of warnings / errors:

Configuring for tb0229 board...
pci_indirect.c: In function 'indirect_read_config_byte':
pci_indirect.c:101:1: warning: implicit declaration of function 'out_le32' [-Wimplicit-function-declaration]
pci_indirect.c:101:1: warning: implicit declaration of function 'in_8' [-Wimplicit-function-declaration]
pci_indirect.c: In function 'indirect_read_config_word':
pci_indirect.c:102:1: warning: implicit declaration of function 'in_le16' [-Wimplicit-function-declaration]
pci_indirect.c: In function 'indirect_read_config_dword':
pci_indirect.c:103:1: warning: implicit declaration of function 'in_le32' [-Wimplicit-function-declaration]
pci_indirect.c: In function 'indirect_write_config_byte':
pci_indirect.c:109:1: warning: implicit declaration of function 'out_8' [-Wimplicit-function-declaration]
pci_indirect.c: In function 'indirect_write_config_word':
pci_indirect.c:110:1: warning: implicit declaration of function 'out_le16' [-Wimplicit-function-declaration]
flash.c: In function 'flash_init':
flash.c:62:25: warning: unused variable 'base_b1' [-Wunused-variable]
flash.c:62:16: warning: unused variable 'base_b0' [-Wunused-variable]
flash.c:61:7: warning: unused variable 'pbcr' [-Wunused-variable]
vr4131-pci.c: In function 'init_vr4131_pci':
vr4131-pci.c:242:18: warning: assignment from incompatible pointer type [enabled by default]
vr4131-pci.c:243:18: warning: assignment from incompatible pointer type [enabled by default]
vr4131-pci.c:244:19: warning: assignment from incompatible pointer type [enabled by default]
vr4131-pci.c:245:19: warning: assignment from incompatible pointer type [enabled by default]
vr4131-pci.c:246:19: warning: assignment from incompatible pointer type [enabled by default]
vr4131-pci.c:247:20: warning: assignment from incompatible pointer type [enabled by default]
tb0229.c: In function 'pci_init_board':
tb0229.c:32:2: warning: implicit declaration of function 'init_vr4131_pci' [-Wimplicit-function-declaration]
tb0229.c: In function 'initdram':
tb0229.c:38:2: warning: passing argument 1 of 'get_ram_size' makes pointer from integer without a cast [enabled by default]
/home/wd/git/u-boot/work/include/common.h:383:6: note: expected 'long int *' but argument is of type 'unsigned int'
mips-linux-ld: Warning: size of symbol `_machine_restart' changed from 8 in arch/mips/cpu/mips32/libmips32.o to 12 in board/tb0229/libtb0229.o
mips-linux-ld: Warning: size of symbol `board_eth_init' changed from 8 in net/libnet.o to 88 in board/tb0229/libtb0229.o
mips-linux-ld: arch/mips/cpu/mips32/start.o: compiled for a big endian system and target is little endian
mips-linux-ld: arch/mips/cpu/mips32/start.o: endianness incompatible with that of the selected emulation
mips-linux-ld: failed to merge target specific data of file arch/mips/cpu/mips32/start.o
mips-linux-ld: arch/mips/cpu/mips32/libmips32.o: compiled for a big endian system and target is little endian
mips-linux-ld: arch/mips/cpu/mips32/libmips32.o: endianness incompatible with that of the selected emulation
mips-linux-ld: failed to merge target specific data of file arch/mips/cpu/mips32/libmips32.o
mips-linux-ld: arch/mips/lib/libmips.o: compiled for a big endian system and target is little endian
mips-linux-ld: arch/mips/lib/libmips.o: endianness incompatible with that of the selected emulation
mips-linux-ld: failed to merge target specific data of file arch/mips/lib/libmips.o
mips-linux-ld: common/libcommon.o: compiled for a big endian system and target is little endian
mips-linux-ld: common/libcommon.o: endianness incompatible with that of the selected emulation
mips-linux-ld: failed to merge target specific data of file common/libcommon.o
mips-linux-ld: disk/libdisk.o: compiled for a big endian system and target is little endian
mips-linux-ld: disk/libdisk.o: endianness incompatible with that of the selected emulation
...


I'll prepare a patch...

Thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/board/tb0229/flash.c b/board/tb0229/flash.c
index 75d7769..4cb5968 100644
--- a/board/tb0229/flash.c
+++ b/board/tb0229/flash.c
@@ -24,7 +24,6 @@ 
  */
 
 #include <common.h>
-#include <asm/ppc4xx.h>
 #include <asm/processor.h>
 
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];	/* info for FLASH chips        */
diff --git a/board/tb0229/tb0229.c b/board/tb0229/tb0229.c
index d3f05b2..8e374a1 100644
--- a/board/tb0229/tb0229.c
+++ b/board/tb0229/tb0229.c
@@ -11,6 +11,7 @@ 
 
 #include <common.h>
 #include <command.h>
+#include <netdev.h>
 #include <asm/addrspace.h>
 #include <asm/io.h>
 #include <asm/reboot.h>
diff --git a/board/tb0229/vr4131-pci.c b/board/tb0229/vr4131-pci.c
index 6ff4293..e6fff9d 100644
--- a/board/tb0229/vr4131-pci.c
+++ b/board/tb0229/vr4131-pci.c
@@ -184,7 +184,7 @@  static int vr4131_pci_write_config_dword (u32 hose, u32 dev, u32 reg, u32 val)
  *	Initialize VR4131 PCIU
  */
 
-vr4131_pciu_init ()
+static void vr4131_pciu_init(void)
 {
 	/* PCI clock */
 	*VR4131_PCICLKSELREG = 0x00000002;