Skip to contentSkip to conversation

MIPS: tb0229: fix GCC 4.6 compile errors and warnings

PATCH New Daniel Schwierzeck 2 participants 7 messages Dec 9, 2011 – Dec 12, 2011 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: tb0229: fix GCC 4.6 compile errors and warnings

---
This patch fixes the last broken board when running MAKEALL -a mips. This board was added by Wolfgang in 2004 and never had a real maintainer. If no one care about this board, I think it could be dropped.

 board/tb0229/flash.c      |    3 --
 board/tb0229/tb0229.c     |   10 ++++---
 board/tb0229/vr4131-pci.c |   65 +++++++++++++++++++++++---------------------
 3 files changed, 40 insertions(+), 38 deletions(-)
board/tb0229/flash.c +0 -3
index 75d7769..ec64e5c 100644
@@ -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        */
@@ -59,8 +58,6 @@ unsigned long flash_init (void)
 {
 	unsigned long size_b0, size_b1;
 	int i;
-	uint pbcr;
-	unsigned long base_b0, base_b1;
 
 	/* Init: no FLASHes known */
 	for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
board/tb0229/tb0229.c +6 -4
index d3f05b2..9c284f0 100644
@@ -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>
@@ -26,21 +27,22 @@ void _machine_restart(void)
 #if defined(CONFIG_PCI)
 static struct pci_controller hose;
 
-void pci_init_board (void)
+void pci_init_board(void)
 {
+	extern void init_vr4131_pci(struct pci_controller *hose);
 	init_vr4131_pci(&hose);
 }
 #endif
 
 phys_size_t initdram(int board_type)
 {
-	return get_ram_size (CONFIG_SYS_SDRAM_BASE, 0x8000000);
+	return get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, 0x8000000);
 }
 
-int checkboard (void)
+int checkboard(void)
 {
 	printf("Board: TANBAC TB0229 ");
-	printf("(CPU Speed %d MHz)\n", (int)CPU_CLOCK_RATE/1000000);
+	printf("(CPU Speed %d MHz)\n", (int) CPU_CLOCK_RATE / 1000000);
 
 	set_io_port_base(0);
 
board/tb0229/vr4131-pci.c +34 -31

188 lines not on this page · raw message

Signature · 1 line
1.7.8
#1 lore raw

PATCH 1/1 MIPS: tb0229: fix GCC 4.6 compile errors and warnings

Dear Daniel Schwierzeck,

Quoted 5 lines · In message <1323442731-12017-1-git-send-email-daniel.schwierzeck@googlemail.com…

---
This patch fixes the last broken board when running MAKEALL -a mips. This board was added by Wolfgang in 2004 and never had a real maintainer. If no one care about this board, I think it could be dropped.

Can you please split thisi nto two patches, one performing just the coding style cleanup, and the second one adding all the rest?

...

board/tb0229/tb0229.c void _machine_restart(void) · line 45

Quoted 6 lines
board/tb0229/tb0229.c +2 -2
-int checkboard (void)
+int checkboard(void)
 {
 	printf("Board: TANBAC TB0229 ");
-	printf("(CPU Speed %d MHz)\n", (int)CPU_CLOCK_RATE/1000000);
+	printf("(CPU Speed %d MHz)\n", (int) CPU_CLOCK_RATE / 1000000);

When we touch this, would it then not make sense to switch to using print_mhz() instead?

board/tb0229/vr4131-pci.c static int vr4131_pci_config_access (u8 access_type, u32 dev, u32 reg, · line 79

Quoted 5 lines
board/tb0229/vr4131-pci.c +2 -1
+	if (access_type == PCI_ACCESS_WRITE)
 		*VR4131_PCICONFDREG = *data;
-	} else {
+	else
 		*data = *VR4131_PCICONFDREG;

You are sure that we don;t need any I/O accessors / memory barriers here (and elsewhere) ?

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
e-credibility: the non-guaranteeable likelihood that  the  electronic
data you're seeing is genuine rather than somebody's made-up crap.
- Karl Lehenbauer
#2 lore raw

PATCH v2 1/1 MIPS: tb0229: fix compile errors

In reply to Daniel Schwierzeck

This board breaks MAKEALL -a mips due to compile errors. This patch fixes only the parts causing the errors to get MAKEALL working.

---
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(-)
board/tb0229/flash.c +0 -1
index 75d7769..4cb5968 100644
@@ -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        */
board/tb0229/tb0229.c +1 -0
index d3f05b2..8e374a1 100644
@@ -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>
board/tb0229/vr4131-pci.c +1 -1
index 6ff4293..e6fff9d 100644
@@ -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;
Signature · 1 line
1.7.8
#3 lore raw

PATCH v2 1/1 MIPS: tb0229: fix compile errors

Dear Daniel Schwierzeck,

Quoted 9 lines · In message <1323621577-13010-1-git-send-email-daniel.schwierzeck@googlemail.com…

This board breaks MAKEALL -a mips due to compile errors. This patch fixes only the parts causing the errors to get MAKEALL working.

---
Changes for v2:
- removed fixes for coding style cleanup and compiler warnings

Quoted 7 lines

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

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What the gods would destroy they first submit to  an  IEEE  standards
committee.
#4 lore raw

PATCH v2 1/1 MIPS: tb0229: fix compile errors

In reply to Daniel Schwierzeck

Dear Daniel Schwierzeck,

Quoted 11 lines · In message <1323621577-13010-1-git-send-email-daniel.schwierzeck@googlemail.com…

This board breaks MAKEALL -a mips due to compile errors. This patch fixes only the parts causing the errors to get MAKEALL working.

---
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

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The sight of death frightens them [Earthers].
	-- Kras the Klingon, "Friday's Child", stardate 3497.2
#5 lore raw

PATCH 1/1 MIPS: remove broken "tb0229" board

The "tb0229" board has long been unmaintained, and is broken. Remove it.

---
 board/tb0229/Makefile        |   47 --
 board/tb0229/config.mk       |   30 -
 board/tb0229/flash.c         | 1197 ------------------------------------------
 board/tb0229/lowlevel_init.S |   70 ---
 board/tb0229/tb0229.c        |   54 --
 board/tb0229/u-boot.lds      |   70 ---
 board/tb0229/vr4131-pci.c    |  254 ---------
 boards.cfg                   |    1 -
 doc/README.scrapyard         |    7 +-
 9 files changed, 4 insertions(+), 1726 deletions(-)
 delete mode 100644 board/tb0229/Makefile
 delete mode 100644 board/tb0229/config.mk
 delete mode 100644 board/tb0229/flash.c
 delete mode 100644 board/tb0229/lowlevel_init.S
 delete mode 100644 board/tb0229/tb0229.c
 delete mode 100644 board/tb0229/u-boot.lds
 delete mode 100644 board/tb0229/vr4131-pci.c
board/tb0229/Makefile deleted +0 -47
deleted file mode 100644
index 76f1664..0000000
@@ -1,47 +0,0 @@
-#
-# (C) Masami Komiya <[email protected]> 2004
-#
-# (C) Copyright 2003-2006
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-include $(TOPDIR)/config.mk
-
-LIB	= $(obj)lib$(BOARD).o
-
-COBJS	= $(BOARD).o flash.o vr4131-pci.o
-SOBJS	= lowlevel_init.o
-
-SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS	:= $(addprefix $(obj),$(COBJS))
-SOBJS	:= $(addprefix $(obj),$(SOBJS))
-
-$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
-	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
board/tb0229/config.mk deleted +0 -30
deleted file mode 100644
index 017511d..0000000
@@ -1,30 +0,0 @@
-#
-# (C) Masami Komiya <[email protected]> 2004
-#
-# (C) Copyright 2003
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-# ROM version
-CONFIG_SYS_TEXT_BASE = 0xBFC00000
-
-# RAM version
-#CONFIG_SYS_TEXT_BASE = 0x80400000
board/tb0229/flash.c deleted +0 -1197

1,197 lines not on this page · raw message

board/tb0229/lowlevel_init.S deleted +0 -70

70 lines not on this page · raw message

board/tb0229/tb0229.c deleted +0 -54

54 lines not on this page · raw message

board/tb0229/u-boot.lds deleted +0 -70

70 lines not on this page · raw message

board/tb0229/vr4131-pci.c deleted +0 -254

254 lines not on this page · raw message

boards.cfg +0 -1
index a0a2bba..1e5b3e0 100644
@@ -331,7 +331,6 @@ M5485GFE		     m68k        mcf547x_8x  m548xevb            freescale      -
 M5485HFE		     m68k        mcf547x_8x  m548xevb            freescale      -           M5485EVB:SYS_BUSCLK=100000000,SYS_BOOTSZ=2,SYS_DRAMSZ=64,SYS_NOR1SZ=16,SYS_VIDEO
 microblaze-generic           microblaze  microblaze  microblaze-generic  xilinx
 qemu_mips                    mips        mips32      qemu-mips           -              -           qemu-mips
-tb0229                       mips        mips32
 vct_platinum                 mips        mips32      vct                 micronas       -           vct:VCT_PLATINUM
 vct_platinumavc              mips        mips32      vct                 micronas       -           vct:VCT_PLATINUMAVC
 vct_platinumavc_onenand      mips        mips32      vct                 micronas       -           vct:VCT_PLATINUMAVC,VCT_ONENAND
doc/README.scrapyard +4 -3
index 08e5a9e..4b5558d 100644
@@ -11,9 +11,10 @@ easily if here is something they might want to dig for...
 
 Board	Arch	CPU	removed	    Commit	last known maintainer/contact
 =============================================================================
-rmu	powerpc	MPC850	-	  2011-12-07	Wolfgang Denk <[email protected]>
-OXC	powerpc	MPC8240	-	  2011-12-07
-BAB7xx	powerpc	MPC740/MPC750  -  2011-12-07	Frank Gottschling <[email protected]>
+tb0229	mips	mips32	-	  2011-12-12
+rmu	powerpc	MPC850	fb82fd7   2011-12-07	Wolfgang Denk <[email protected]>
+OXC	powerpc	MPC8240	309a292   2011-12-07
+BAB7xx	powerpc	MPC740/MPC750 c53043b 2011-12-07 Frank Gottschling <[email protected]>
 xm250   arm     pxa     c746cdd   2011-25-11
 pleb2   arm     pxa     b185a1c   2011-25-11
 cradle  arm     pxa     4e24f8a   2011-25-11    Kyle Harris <[email protected]>
Signature · 1 line
1.7.6.4
#6 lore raw

PATCH 1/1 MIPS: remove broken "tb0229" board

Dear Wolfgang Denk,

Quoted 14 lines · In message <[email protected]> you wrote:

The "tb0229" board has long been unmaintained, and is broken. Remove it.

---
 board/tb0229/Makefile        |   47 --
 board/tb0229/config.mk       |   30 -
 board/tb0229/flash.c         | 1197 ------------------------------------------
 board/tb0229/lowlevel_init.S |   70 ---
 board/tb0229/tb0229.c        |   54 --
 board/tb0229/u-boot.lds      |   70 ---
 board/tb0229/vr4131-pci.c    |  254 ---------
 boards.cfg                   |    1 -
 doc/README.scrapyard         |    7 +-
Quoted 8 lines
 9 files changed, 4 insertions(+), 1726 deletions(-)
 delete mode 100644 board/tb0229/Makefile
 delete mode 100644 board/tb0229/config.mk
 delete mode 100644 board/tb0229/flash.c
 delete mode 100644 board/tb0229/lowlevel_init.S
 delete mode 100644 board/tb0229/tb0229.c
 delete mode 100644 board/tb0229/u-boot.lds
 delete mode 100644 board/tb0229/vr4131-pci.c

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A direct quote from the Boss: "We passed over a lot of good people to
get the ones we hired."