From 409ecdc0bb47dd28b0af6c25ffd658d22cc36b37 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 18 Nov 2007 16:36:27 +0100 Subject: [PATCH] Fix compiler warnings for PPC systems. Update CHANGELOG. Signed-off-by: Wolfgang Denk --- CHANGELOG | 160 ++++++++++++++++++++++++++++++++++ board/freescale/mpc8544ds/mpc8544ds.c | 2 +- board/tqm5200/tqm5200.c | 4 +- common/usb_storage.c | 2 +- cpu/mpc86xx/spd_sdram.c | 4 +- cpu/mpc86xx/speed.c | 3 + drivers/ati_radeon_fb.c | 8 +- drivers/bios_emulator/besys.c | 2 +- drivers/bios_emulator/biosemu.c | 6 +- drivers/tsec.c | 3 + drivers/tsi108_i2c.c | 2 +- drivers/tsi108_pci.c | 3 + 12 files changed, 187 insertions(+), 12 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5085cb6..6a4b222 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,163 @@ +commit 079c2c4fa71c0d1ebef394508df9088df8a308d3 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sat Nov 17 11:31:10 2007 +0100 + + Fix warning differ in signedness in net/net.c and net/nfs.c + +commit 7e14fc65368cbd2861b1207453da55a4fc7b3f81 +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:42:45 2007 +0900 + + gth2.c: Fix a warning on gth2 build. + + gth2.c: In function 'misc_init_r': + gth2.c:434: warning: pointer targets in passing argument 2 of 'setenv' differ in signedness + + Signed-off-by: Shinya Kuribayashi + +commit 2309c130aa4c84b91bd874a41269c923eb61b555 +Author: Stefan Roese +Date: Sat Nov 17 07:58:25 2007 +0100 + + Fix warning differ in signedness in common/cmd_scsi.c + + Signed-off-by: Stefan Roese + +commit 7e1d884b7cb602007329c517ec1c453e3a6a5d9c +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:05:26 2007 +0900 + + [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker + + Current trick to pick up GNU assembler minor version does not work with the + latest binutils (2007-03-01 or later) due to ${PKGVERSION} now default to + "(GNU Binutils) ". + + $ sde-as --version |grep "GNU assembler" + GNU assembler 2.15.94 mipssde-6.02.02-20050602 + $ sde-as --version |grep "GNU assembler" |awk '{print $3}' + 2.15.94 + $ sde-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' + 15 + $ + + $ mips-linux-as --version |grep "GNU assembler" + GNU assembler (GNU Binutils) 2.18 + $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' + (GNU + $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}' + (no output) + $ + + As a result of above, you'll see many noises with such binutils: + + make -C cpu/mips/ + /bin/sh: line 0: [: : integer expression expected + /bin/sh: line 0: [: : integer expression expected + make[1]: Entering directory `/home/skuribay/devel/u-boot.git/cpu/mips' + mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o incaip_wdt.o incaip_wdt.S + /bin/sh: line 0: [: : integer expression expected + mips-linux-gcc -D__ASSEMBLY__ -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o cache.o cache.S + /bin/sh: line 0: [: : integer expression expected + mips-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xB0000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -Wall -Wstrict-prototypes -c -o asc_serial.o asc_serial.c + /bin/sh: line 0: [: : integer expression expected + + This patch simplifies the trick and makes it work with both versions of gas. + I also replace an expensive `awk (or gawk)' with `cut'. + + Signed-off-by: Shinya Kuribayashi + +commit 16664f72850846e645616da1c0fa5afcd6d15f15 +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:05:26 2007 +0900 + + [MIPS] Remove useless instructions for initializing $gp. + + Signed-off-by: Shinya Kuribayashi + +commit 03c031d5660ea946c39af6e2e16267da857c609f +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:27:06 2007 +0900 + + [MIPS] MIPS 4K core: Coding style cleanups + + No logical changes. + + Signed-off-by: Shinya Kuribayashi + +commit f5e429d3860bba4c6ae8bead8f78349fa24491b2 +Author: Shinya Kuribayashi +Date: Sat Nov 17 20:05:20 2007 +0900 + + [MIPS] gth2.c: Fix a warning on gth2 build. + + gth2.c: In function 'misc_init_r': + gth2.c:434: warning: pointer targets in passing argument 2 of 'setenv' differ in signedness + + Signed-off-by: Shinya Kuribayashi + +commit 4fbd0741b2b6441da10be93e10267122581b7079 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:22:33 2007 +0900 + + [MIPS] au1x00_eth.c: Fixed a warning on pb1000 build. + + au1x00_eth.c: In function 'au1x00_miiphy_write': + au1x00_eth.c:139: warning: 'return' with no value, in function returning non-void + + Signed-off-by: Shinya Kuribayashi + +commit f01320459736f156707425cf8112f98606301aa4 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:25 2007 +0900 + + [MIPS] au1x00_eth.c: Fix au1x00_miiphy_{read,write} build error + + au1x00_eth.c: In function 'au1x00_enet_initialize': + au1x00_eth.c:246: error: 'au1x00_miiphy_read' undeclared (first use in this function) + au1x00_eth.c:246: error: (Each undeclared identifier is reported only once + au1x00_eth.c:246: error: for each function it appears in.) + au1x00_eth.c:246: error: 'au1x00_miiphy_write' undeclared (first use in this function) + au1x00_eth.c: In function 'au1x00_miiphy_write': + au1x00_eth.c:298: warning: 'return' with no value, in function returning non-void + make[1]: *** [au1x00_eth.o] Error 1 + + Fixed by moving these two functions forward. + + Signed-off-by: Shinya Kuribayashi + +commit b09258c5393edd1087c5f39ae68338f16b49f8b3 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:25 2007 +0900 + + MAKEALL: Added missing pb1000 board + + Signed-off-by: Shinya Kuribayashi + +commit 2e4a6e3667a1e39c0e6e99498686b15d2718b369 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:24 2007 +0900 + + [MIPS] pb1000: Replace obsolete memsetup.S with lowlevel_init.S + + Signed-off-by: Shinya Kuribayashi + +commit 662e5cb397249c3ea88a4c3255e9ccfc40b98d82 +Author: Shinya Kuribayashi +Date: Sat Oct 27 15:00:24 2007 +0900 + + [MIPS] u-boot.lds: Cleanup __u_boot_cmd_{start,end} + + Signed-off-by: Shinya Kuribayashi + +commit 5947f6999aafa7c54c1390983d264a8463dfea8e +Author: Wolfgang Denk +Date: Sat Nov 17 02:34:38 2007 +0100 + + Update CHANGELOIG, prepare for -rc4 + + Signed-off-by: Wolfgang Denk + commit fd329e6f05bbdfe6bd71b0e09f0c76d3b0a025a5 Author: Luotao Fu Date: Wed Nov 14 18:58:33 2007 +0100 diff --git a/board/freescale/mpc8544ds/mpc8544ds.c b/board/freescale/mpc8544ds/mpc8544ds.c index 76d9091..b6c9e93 100644 --- a/board/freescale/mpc8544ds/mpc8544ds.c +++ b/board/freescale/mpc8544ds/mpc8544ds.c @@ -227,7 +227,7 @@ pci_init_board(void) * Activate ULI1575 legacy chip by performing a fake * memory access. Needed to make ULI RTC work. */ - in_be32(CFG_PCIE3_MEM_BASE); + in_be32((u32 *)CFG_PCIE3_MEM_BASE); } else { printf (" PCIE3: disabled\n"); } diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c index da4e228..f33d172 100644 --- a/board/tqm5200/tqm5200.c +++ b/board/tqm5200/tqm5200.c @@ -444,6 +444,8 @@ ulong post_word_load (void) #ifdef CONFIG_BOARD_EARLY_INIT_R int board_early_init_r (void) { + extern int usb_cpu_init(void); + #ifdef CONFIG_PS2MULT ps2mult_early_init(); #endif /* CONFIG_PS2MULT */ @@ -591,9 +593,9 @@ int last_stage_init (void) disable_ctrlc(1); } #endif +#endif /* !CONFIG_TQM5200S */ return 0; -#endif /* !CONFIG_TQM5200S */ } #ifdef CONFIG_VIDEO_SM501 diff --git a/common/usb_storage.c b/common/usb_storage.c index 0f79f36..443d785 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1195,7 +1195,7 @@ int usb_stor_get_info(struct usb_device *dev,struct us_data *ss,block_dev_desc_t dev_desc->product[16] = 0; dev_desc->revision[4] = 0; #ifdef CONFIG_USB_BIN_FIXUP - usb_bin_fixup(dev->descriptor, dev_desc->vendor, dev_desc->product); + usb_bin_fixup(dev->descriptor, (uchar *)dev_desc->vendor, (uchar *)dev_desc->product); #endif /* CONFIG_USB_BIN_FIXUP */ USB_STOR_PRINTF("ISO Vers %X, Response Data %X\n",usb_stor_buf[2],usb_stor_buf[3]); if(usb_test_unit_ready(pccb,ss)) { diff --git a/cpu/mpc86xx/spd_sdram.c b/cpu/mpc86xx/spd_sdram.c index d57bcdf..265e033 100644 --- a/cpu/mpc86xx/spd_sdram.c +++ b/cpu/mpc86xx/spd_sdram.c @@ -1114,8 +1114,10 @@ spd_sdram(void) int memsize_ddr1 = 0; unsigned int law_size_ddr1; volatile immap_t *immap = (immap_t *)CFG_IMMR; - volatile ccsr_ddr_t *ddr1 = &immap->im_ddr1; volatile ccsr_local_mcm_t *mcm = &immap->im_local_mcm; +#ifdef CONFIG_DDR_INTERLEAVE + volatile ccsr_ddr_t *ddr1 = &immap->im_ddr1; +#endif #if (CONFIG_NUM_DDR_CONTROLLERS > 1) int memsize_ddr2_dimm1 = 0; diff --git a/cpu/mpc86xx/speed.c b/cpu/mpc86xx/speed.c index 23161ca..4f7e8f1 100644 --- a/cpu/mpc86xx/speed.c +++ b/cpu/mpc86xx/speed.c @@ -31,6 +31,9 @@ DECLARE_GLOBAL_DATA_PTR; +/* used in some defintiions of CONFIG_SYS_CLK_FREQ */ +extern unsigned long get_board_sys_clk(unsigned long dummy); + void get_sys_info(sys_info_t *sysInfo) { volatile immap_t *immap = (immap_t *) CFG_IMMR; diff --git a/drivers/ati_radeon_fb.c b/drivers/ati_radeon_fb.c index c174f37..9613d80 100644 --- a/drivers/ati_radeon_fb.c +++ b/drivers/ati_radeon_fb.c @@ -300,7 +300,7 @@ typedef struct { u32 val; } reg_val; - +#if 0 /* unused ? -> scheduled for removal */ /* these common regs are cleared before mode setting so they do not * interfere with anything */ @@ -316,11 +316,10 @@ static reg_val common_regs[] = { { CAP0_TRIG_CNTL, 0 }, { CAP1_TRIG_CNTL, 0 }, }; - +#endif /* 0 */ void radeon_setmode(void) { - int i; struct radeon_regs *mode = malloc(sizeof(struct radeon_regs)); mode->crtc_gen_cntl = 0x03000200; @@ -351,6 +350,9 @@ void radeon_setmode(void) radeon_write_pll_regs(rinfo, mode); } +#include "bios_emulator/include/biosemu.h" +extern int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo ** pVGAInfo, int cleanUp); + int radeon_probe(struct radeonfb_info *rinfo) { pci_dev_t pdev; diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c index 8f1d8b2..cb1b0c1 100644 --- a/drivers/bios_emulator/besys.c +++ b/drivers/bios_emulator/besys.c @@ -96,7 +96,7 @@ static u8 *BE_memaddr(u32 addr) else if (addr >= 0xFFFF5 && addr < 0xFFFFE) { /* Return a faked BIOS date string for non-x86 machines */ DB(printf("BE_memaddr - Returning BIOS date\n");) - return BE_biosDate + addr - 0xFFFF5; + return (u8 *)(BE_biosDate + addr - 0xFFFF5); } else if (addr == 0xFFFFE) { /* Return system model identifier for non-x86 machines */ DB(printf("BE_memaddr - Returning model\n");) diff --git a/drivers/bios_emulator/biosemu.c b/drivers/bios_emulator/biosemu.c index ccfc872..75ceb45 100644 --- a/drivers/bios_emulator/biosemu.c +++ b/drivers/bios_emulator/biosemu.c @@ -96,7 +96,7 @@ int X86API BE_init(u32 debugFlags, int memSize, BE_VGAInfo * info, int shared) return 0; } - M.mem_base = (unsigned long)malloc(memSize); + M.mem_base = malloc(memSize); if (M.mem_base == NULL){ printf("Biosemu:Out of memory!"); @@ -106,7 +106,7 @@ int X86API BE_init(u32 debugFlags, int memSize, BE_VGAInfo * info, int shared) _BE_env.emulateVGA = 0; _BE_env.busmem_base = (unsigned long)malloc(128 * 1024); - if (_BE_env.busmem_base == NULL){ + if ((void *)_BE_env.busmem_base == NULL){ printf("Biosemu:Out of memory!"); return 0; } @@ -230,7 +230,7 @@ Cleans up and exits the emulator. void X86API BE_exit(void) { free(M.mem_base); - free(_BE_env.busmem_base); + free((void *)_BE_env.busmem_base); } /**************************************************************************** diff --git a/drivers/tsec.c b/drivers/tsec.c index 7ba8f0c..ca6284b 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -117,10 +117,13 @@ struct phy_info *get_phy_info(struct eth_device *dev); void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd); static void adjust_link(struct eth_device *dev); static void relocate_cmds(void); +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \ + && !defined(BITBANGMII) static int tsec_miiphy_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value); static int tsec_miiphy_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value); +#endif #ifdef CONFIG_MCAST_TFTP static int tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set); #endif diff --git a/drivers/tsi108_i2c.c b/drivers/tsi108_i2c.c index 3a3b75c..d6736b0 100644 --- a/drivers/tsi108_i2c.c +++ b/drivers/tsi108_i2c.c @@ -276,7 +276,7 @@ int i2c_probe (uchar chip) * The Tsi108 HW doesn't support sending just the chip address * and checkong for an back. */ - return i2c_read (chip, 0, 1, (char *)&tmp, 1); + return i2c_read (chip, 0, 1, (uchar *)&tmp, 1); } #endif diff --git a/drivers/tsi108_pci.c b/drivers/tsi108_pci.c index 9f606df..d5f11e4 100644 --- a/drivers/tsi108_pci.c +++ b/drivers/tsi108_pci.c @@ -33,6 +33,9 @@ #include #include #include +#ifdef CONFIG_OF_FLAT_TREE +#include +#endif struct pci_controller local_hose; -- 2.7.4