oweals/u-boot.git
13 years agoboard/sacsng/sacsng.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:15 +0000 (05:13 +0000)]
board/sacsng/sacsng.c: Fix GCC 4.6 build warning

Fix:
sacsng.c: In function 'initdram':
sacsng.c:180:9: warning: variable 'spd_size' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
13 years agoboard/sacsng/sacsng.c: CodingStyle cleanup
Wolfgang Denk [Sat, 5 Nov 2011 05:13:14 +0000 (05:13 +0000)]
board/sacsng/sacsng.c: CodingStyle cleanup

Make (mostly) checkpatch clean.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
13 years agoboard/rpxsuper/flash.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:13 +0000 (05:13 +0000)]
board/rpxsuper/flash.c: Fix GCC 4.6 build warning

Fix:
flash.c: In function 'flash_init':
flash.c:52:19: warning: variable 'size' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/rpxsuper/flash.c: minimal CodingStyle cleanup
Wolfgang Denk [Sat, 5 Nov 2011 05:13:12 +0000 (05:13 +0000)]
board/rpxsuper/flash.c: minimal CodingStyle cleanup

Really minimal and local, just good enough to make checkpatch not
complain about the changes in the following commit.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/ids8247/ids8247.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:11 +0000 (05:13 +0000)]
board/ids8247/ids8247.c: Fix GCC 4.6 build warning

Fix:
ids8247.c: In function 'initdram':
ids8247.c:284:14: warning: variable 'lsize' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agoboard/hymod/input.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:10 +0000 (05:13 +0000)]
board/hymod/input.c: Fix GCC 4.6 build warning

Fix:
input.c: In function 'hymod_get_ethaddr':
input.c:79:10: warning: variable 'ea' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Murray Jensen <Murray.Jensen@csiro.au>
13 years agoboard/ep82xxm/ep82xxm.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:09 +0000 (05:13 +0000)]
board/ep82xxm/ep82xxm.c: Fix GCC 4.6 build warning

Fix:
ep82xxm.c: In function 'initdram':
ep82xxm.c:233:16: warning: variable 'ramtmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/gw8260/flash.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:08 +0000 (05:13 +0000)]
board/gw8260/flash.c: Fix GCC 4.6 build warning

Fix:
flash.c: In function 'flash_init':
flash.c:81:16: warning: variable 'size' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Oliver Brown <obrown@adventnetworks.com>
13 years agoboard/gw8260/flash.c: minimal CodingStyle cleanup
Wolfgang Denk [Sat, 5 Nov 2011 05:13:07 +0000 (05:13 +0000)]
board/gw8260/flash.c: minimal CodingStyle cleanup

Really minimal and local, just good enough to make checkpatch not
complain about the changes in the following commit.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Oliver Brown <obrown@adventnetworks.com>
13 years agoboard/cogent/flash.c: Fix GCC 4.6 buiild warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:06 +0000 (05:13 +0000)]
board/cogent/flash.c: Fix GCC 4.6 buiild warning

Fix:
flash.c: In function 'flash_init':
flash.c:295:16: warning: variable 'fip' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Murray Jensen <Murray.Jensen@csiro.au>
13 years agoarch/powerpc/cpu/mpc8260/spi.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 5 Nov 2011 05:13:05 +0000 (05:13 +0000)]
arch/powerpc/cpu/mpc8260/spi.c: Fix GCC 4.6 build warnings

Fix:
spi.c: In function 'spi_init_r':
spi.c:279:22: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
spi.c: In function 'spi_xfer':
spi.c:361:22: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocommon/cmd_flash.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 5 Nov 2011 05:13:04 +0000 (05:13 +0000)]
common/cmd_flash.c: Fix GCC 4.6 build warnings

Fix:
cmd_flash.c:355:32: warning: 'info' may be used uninitialized in this
function [-Wuninitialized]
cmd_flash.c:354:10: warning: 'sect_first' may be used uninitialized in
this function [-Wuninitialized]
cmd_flash.c:354:10: warning: 'sect_last' may be used uninitialized in
this function [-Wuninitialized]
cmd_flash.c: In function 'do_protect':
cmd_flash.c:540:9: warning: 'info' may be used uninitialized in this
function [-Wuninitialized]
cmd_flash.c:538:9: warning: 'sect_first' may be used uninitialized in
this function [-Wuninitialized]
cmd_flash.c:538:9: warning: 'sect_last' may be used uninitialized in
this function [-Wuninitialized]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/net/rtl8139.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 5 Nov 2011 05:13:03 +0000 (05:13 +0000)]
drivers/net/rtl8139.c: Fix GCC 4.6 build warnings

Fix:
rtl8139.c: In function 'rtl8139_probe':
rtl8139.c:256:15: warning: variable 'fullduplex' set but not used
[-Wunused-but-set-variable]
rtl8139.c:256:6: warning: variable 'speed10' set but not used
[-Wunused-but-set-variable]
rtl8139.c: In function 'rtl_transmit':
rtl8139.c:419:16: warning: variable 'txstatus' set but not used
[-Wunused-but-set-variable]

Change code to use new debug macros; also fix the new errors and
warnigns popping up now, like "error: 'to' undeclared" and some
"warning: format '%X' expects argument of type 'unsigned int', but
argument X has type 'long unsigned int'"

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/linkstation/ide.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Mon, 7 Nov 2011 21:43:37 +0000 (22:43 +0100)]
board/linkstation/ide.c: Fix GCC 4.6 build warnings

Fix:
ide.c: In function 'ide_preinit':
ide.c:69:21: warning: array subscript is above array bounds
[-Warray-bounds]
ide.c:69:21: warning: array subscript is above array bounds
[-Warray-bounds]
ide.c:70:17: warning: array subscript is above array bounds
[-Warray-bounds]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
13 years agodrivers/net/rtl8169.c: Fix GCC 4.6 build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:13:01 +0000 (05:13 +0000)]
drivers/net/rtl8169.c: Fix GCC 4.6 build warning

Fix:
rtl8169.c: In function 'rtl_init':
rtl8169.c:742:13: warning: variable 'printed_version' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/mousse/flash.c: Fix GCC 4.6 buil warnings
Wolfgang Denk [Sat, 5 Nov 2011 05:13:00 +0000 (05:13 +0000)]
board/mousse/flash.c: Fix GCC 4.6 buil warnings

Fix:
flash.c: In function 'flash_erase':
flash.c:780:18: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]
flash.c:779:11: warning: variable 'addr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/etin/kvme080/multiverse.c: Fix GCC 4.6 build warning.
Wolfgang Denk [Sat, 5 Nov 2011 05:12:59 +0000 (05:12 +0000)]
board/etin/kvme080/multiverse.c: Fix GCC 4.6 build warning.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Sangmoon Kim <dogoil@etinsys.com>
13 years agodrivers/net/pcnet.c: Change debug code to fix build warning
Wolfgang Denk [Sat, 5 Nov 2011 05:12:58 +0000 (05:12 +0000)]
drivers/net/pcnet.c: Change debug code to fix build warning

Fix:
pcnet.c: In function 'pcnet_probe':
pcnet.c:247:8: warning: variable 'chipname' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Wolfgang Grandegger <wg@denx.de>
13 years agoboard/alaska/flash.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:56:00 +0000 (15:56 +0000)]
board/alaska/flash.c: Fix GCC 4.6 build warnings

Fix:
flash.c: In function 'flash_erase':
flash.c:409:21: warning: variable 'last' set but not used
[-Wunused-but-set-variable]
flash.c:408:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data':
flash.c:669:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]
flash.c: In function 'write_data_block':
flash.c:709:6: warning: variable 'flag' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/lib/bat_rw.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:59 +0000 (15:55 +0000)]
arch/powerpc/lib/bat_rw.c: Fix GCC 4.6 build warning

Fix:
bat_rw.c: In function 'write_bat':
bat_rw.c:38:6: warning: variable 'batn' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andy Fleming <afleming@gmail.com>
13 years agompc8220/i2c.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:58 +0000 (15:55 +0000)]
mpc8220/i2c.c: Fix GCC 4.6 build warning

Fix:
i2c.c: In function 'wait_for_bb':
i2c.c:109:16: warning: variable 'temp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agompc8260/i2c.c: replace PRINTD() by debug()
Wolfgang Denk [Fri, 4 Nov 2011 15:55:57 +0000 (15:55 +0000)]
mpc8260/i2c.c: replace PRINTD() by debug()

This also fixes some GCC 4.6 build warnings like:
i2c.c: In function 'i2c_init':
i2c.c:221:26: warning: variable 'txbd' set but not used
[-Wunused-but-set-variable]
i2c.c:221:19: warning: variable 'rxbd' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agompc8260/i2c.c: CodingStyle cleanup
Wolfgang Denk [Fri, 4 Nov 2011 15:55:56 +0000 (15:55 +0000)]
mpc8260/i2c.c: CodingStyle cleanup

Make (mostly) checkpatch clean (don't convert to use I/O accessors
yet, so there will be "Use of volatile is usually wrong" warnings
left.  Also accept some other harmless checkpatch warnings.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agompc8220/fec.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:55 +0000 (15:55 +0000)]
mpc8220/fec.c: Fix GCC 4.6 build warning

Fix:
fec.c: In function 'mpc8220_fec_recv':
fec.c:733:8: warning: variable 'frame' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocommon/cmd_i2c.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:54 +0000 (15:55 +0000)]
common/cmd_i2c.c: Fix GCC 4.6 build warning

Fix:
cmd_i2c.c: In function 'do_i2c_add_bus':
cmd_i2c.c:1212:19: warning: variable 'dev' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agoboard/tqc/tqm8272/tqm8272.c: Fix GCC 4.6 build warning:
Wolfgang Denk [Fri, 4 Nov 2011 15:55:53 +0000 (15:55 +0000)]
board/tqc/tqm8272/tqm8272.c: Fix GCC 4.6 build warning:

Fix:
tqm8272.c: In function 'initdram':
tqm8272.c:462:14: warning: variable 'lsize' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agompc8260/speed.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:52 +0000 (15:55 +0000)]
mpc8260/speed.c: Fix GCC 4.6 build warnings

Fix:
speed.c: In function 'get_clocks':
speed.c:113:30: warning: variable 'cpmdf' set but not used
[-Wunused-but-set-variable]
speed.c:113:23: warning: variable 'busdf' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoTQM850M: Add missing CONFIG_BOOTDELAY
Wolfgang Denk [Fri, 4 Nov 2011 15:55:51 +0000 (15:55 +0000)]
TQM850M: Add missing CONFIG_BOOTDELAY

This also fixes a build warning:
main.c: In function 'main_loop':
main.c:311:16: warning: variable 'bootlimit' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/svm_sc8xx/flash.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:50 +0000 (15:55 +0000)]
board/svm_sc8xx/flash.c: Fix GCC 4.6 build warning

Fix:
flash.c: In function 'write_word':
flash.c:542:15: warning: variable 'last' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/svm_sc8xx/flash.c: CodingStyle cleanup
Wolfgang Denk [Fri, 4 Nov 2011 15:55:49 +0000 (15:55 +0000)]
board/svm_sc8xx/flash.c: CodingStyle cleanup

Make (mostly) checkpatch clean (don't convert to use I/O accessors
yet, so there will be "Use of volatile is usually wrong" warnings
left.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/svm_sc8xx/svm_sc8xx.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:48 +0000 (15:55 +0000)]
board/svm_sc8xx/svm_sc8xx.c: Fix GCC 4.6 build warning

Fix:
svm_sc8xx.c: In function 'checkboard':
svm_sc8xx.c:83:6: warning: variable 'board_type' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/rbc823/flash.c: Fix flash initalization
Wolfgang Denk [Fri, 4 Nov 2011 15:55:47 +0000 (15:55 +0000)]
board/rbc823/flash.c: Fix flash initalization

The RBC823 has only one NOR flash bank.  Remove all code trying to
deal with a second bank.  This also fixes a number of GCC 4.6 build
warnings:
flash.c: In function 'flash_init':
flash.c:62:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:63:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:66:12: warning: array subscript is above array bounds
[-Warray-bounds]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/rbc823/flash.c: CodingStyle cleanup
Wolfgang Denk [Fri, 4 Nov 2011 15:55:46 +0000 (15:55 +0000)]
board/rbc823/flash.c: CodingStyle cleanup

Make (mostly) checkpatch clean (don't convert to use I/O accessors
yet, so there will be "Use of volatile is usually wrong" warnings
left.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/fads/fads.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:45 +0000 (15:55 +0000)]
board/fads/fads.c: Fix GCC 4.6 build warning

Fix:
fads.c: In function 'initdram':
fads.c:606:7: warning: variable 'base' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/mbx8xx/mbx8xx.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:44 +0000 (15:55 +0000)]
board/mbx8xx/mbx8xx.c: Fix GCC 4.6 build warnings

Fix:
mbx8xx.c: In function 'mbx_init':
mbx8xx.c:127:15: warning: variable 'refclock' set but not used
[-Wunused-but-set-variable]
mbx8xx.c: In function 'board_get_cpufreq':
mbx8xx.c:231:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
mbx8xx.c: In function 'get_reffreq':
mbx8xx.c:242:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agompc8xx/spi.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:43 +0000 (15:55 +0000)]
mpc8xx/spi.c: Fix GCC 4.6 build warnings

Fix:
spi.c: In function 'spi_init_f':
spi.c:144:21: warning: variable 'iop' set but not used
[-Wunused-but-set-variable]
spi.c:142:22: warning: variable 'cpi' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agonet/net.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:42 +0000 (15:55 +0000)]
net/net.c: Fix GCC 4.6 build warning

Fix:
net.c: In function 'CDPHandler':
net.c:1083:8: warning: variable 'applid' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/genietv/flash.c: Fix flash initialization
Wolfgang Denk [Fri, 4 Nov 2011 15:55:41 +0000 (15:55 +0000)]
board/genietv/flash.c: Fix flash initialization

The GENIETV has only one NOR flash bank.  Remove all code trying to
deal with a second bank.  This also fixes a number of GCC 4.6 build
warnings:
flash.c:65:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:66:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:69:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:183:2: warning: format '%x' expects argument of type 'unsigned
int', but argument 2 has type '

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/genietv/flash.c: CodingStyle cleanup
Wolfgang Denk [Fri, 4 Nov 2011 15:55:40 +0000 (15:55 +0000)]
board/genietv/flash.c: CodingStyle cleanup

Make (mostly) checkpatch clean (don't convert to use I/O accessors yet,
so there will be "Use of volatile is usually wrong" warnings left.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/etx094/flash.c: Fix flash initialization
Wolfgang Denk [Fri, 4 Nov 2011 15:55:39 +0000 (15:55 +0000)]
board/etx094/flash.c: Fix flash initialization

The ETX094 has only one NOR flash bank.  Remove all code trying to
deal with a second bank.  This also fixes a number of GCC 4.6 build
warnings:
flash.c: In function 'flash_init':
flash.c:68:13: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:70:13: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:72:13: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:128:13: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:129:13: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:133:12: warning: array subscript is above array bounds
[-Warray-bounds]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/etx094/flash.c: CodingStyle cleanup
Wolfgang Denk [Fri, 4 Nov 2011 15:55:38 +0000 (15:55 +0000)]
board/etx094/flash.c: CodingStyle cleanup

Make (mostly) checkpatch clean (don't convert to use I/O accessors yet,
so there will be "Use of volatile is usually wrong" warnings left.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agompc8xx/i2c.c: replace PRINTD() by debug()
Wolfgang Denk [Fri, 4 Nov 2011 15:55:37 +0000 (15:55 +0000)]
mpc8xx/i2c.c: replace PRINTD() by debug()

This also fixes some GCC 4.6 build warnings like:
warning: variable 'txbd' set but not used [-Wunused-but-set-variable]
warning: variable 'rxbd' set but not used [-Wunused-but-set-variable]

Signed-off-by: WOlfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agompc8xx/i2c.c: CodungStyle cleanup
Wolfgang Denk [Fri, 4 Nov 2011 15:55:36 +0000 (15:55 +0000)]
mpc8xx/i2c.c: CodungStyle cleanup

Make (mostly) checkpatch-clean

We don't acctually change the code (like convert to use I/O
accessors), so there will be some remaining "Use of volatile"
warnings from checkpatch.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agoboard/eltec/mhpc/flash.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:35 +0000 (15:55 +0000)]
board/eltec/mhpc/flash.c: Fix GCC 4.6 build warning

Fix:
flash.c: In function 'write_buff':
flash.c:314:6: warning: variable 'count' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Frank Gottschling <fgottschling@eltec.de>
13 years agoboard/kup/kup4k/kup4k.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:34 +0000 (15:55 +0000)]
board/kup/kup4k/kup4k.c: Fix GCC 4.6 build warning

Fix:
kup4k.c: In function 'initdram':
kup4k.c:155:19: warning: variable 'mod' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Klaus Heydeck <heydeck@kieback-peter.de>
13 years agoICU862: Fix incorrect flash handling
Wolfgang Denk [Fri, 4 Nov 2011 15:55:33 +0000 (15:55 +0000)]
ICU862: Fix incorrect flash handling

There is only one bank of NOR flash memory on ICU862 boards.
Remove code that attempts to deal with a second bank.

This also fixes build warnings:
flash.c: In function 'flash_init':
flash.c:120:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:121:12: warning: array subscript is above array bounds
[-Warray-bounds]
flash.c:124:12: warning: array subscript is above array bounds
[-Warray-bounds]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agompc8xx/cpu.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:32 +0000 (15:55 +0000)]
mpc8xx/cpu.c: Fix GCC 4.6 build warnings

Fix:
cpu.c: In function 'check_CPU':
cpu.c:188:8: warning: variable 'mid' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/r360mpi/pcmcia.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:31 +0000 (15:55 +0000)]
board/r360mpi/pcmcia.c: Fix GCC 4.6 build warnings

Fix:
pcmcia.c: In function 'pcmcia_hardware_enable':
pcmcia.c:22:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_hardware_disable':
pcmcia.c:130:25: warning: variable 'pcmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/netta/pcmcia.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:30 +0000 (15:55 +0000)]
board/netta/pcmcia.c: Fix GCC 4.6 build warnings

Fix:
pcmcia.c: In function 'cfg_ports':
pcmcia.c:151:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:150:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_hardware_enable':
pcmcia.c:179:25: warning: variable 'sysp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:177:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:176:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_hardware_disable':
pcmcia.c:271:25: warning: variable 'pcmp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:270:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_voltage_set':
pcmcia.c:303:9: warning: variable 'sreg' set but not used
[-Wunused-but-set-variable]
pcmcia.c:300:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/netta/codec.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:29 +0000 (15:55 +0000)]
board/netta/codec.c: Fix GCC 4.6 build warnings

Fix:
codec.c: In function 's_write_BR':
codec.c:1389:15: warning: variable 'v' set but not used
[-Wunused-but-set-variable]
codec.c: In function 's_write_OR':
codec.c:1400:15: warning: variable 'v' set but not used
[-Wunused-but-set-variable]
codec.c: In function 's_write_NR':
codec.c:1411:15: warning: variable 'v' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/mbx8xx/pcmcia.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:28 +0000 (15:55 +0000)]
board/mbx8xx/pcmcia.c: Fix GCC 4.6 build warnings

Fix:
pcmcia.c: In function 'pcmcia_hardware_enable':
pcmcia.c:83:25: warning: variable 'sysp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:81:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:80:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/manroland/uc100/pcmcia.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:27 +0000 (15:55 +0000)]
board/manroland/uc100/pcmcia.c: Fix GCC 4.6 build warnings

Fix:
pcmcia.c: In function 'pcmcia_voltage_set':
pcmcia.c:158:25: warning: variable 'pcmp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:157:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/lwmon/pcmcia.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:26 +0000 (15:55 +0000)]
board/lwmon/pcmcia.c: Fix GCC 4.6 build warnings

Fix:
pcmcia.c: In function 'pcmcia_hardware_enable':
pcmcia.c:33:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]
pcmcia.c:32:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_voltage_set':
pcmcia.c:174:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/kup/common/pcmcia.c: Fix GCC 4.6 compiler warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:25 +0000 (15:55 +0000)]
board/kup/common/pcmcia.c: Fix GCC 4.6 compiler warnings

Fix:
../common/pcmcia.c: In function 'pcmcia_hardware_enable':
../common/pcmcia.c:23:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
../common/pcmcia.c: In function 'pcmcia_voltage_set':
../common/pcmcia.c:152:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Klaus Heydeck <heydeck@kieback-peter.de>
13 years agoboard/icu862/pcmcia.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:24 +0000 (15:55 +0000)]
board/icu862/pcmcia.c: Fix GCC 4.6 build warning

Fix:
pcmcia.c: In function 'cfg_port_B':
pcmcia.c:21:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_hardware_enable':
pcmcia.c:50:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]
pcmcia.c: In function 'pcmcia_voltage_set':
pcmcia.c:191:20: warning: variable 'immap' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/c2mon/pcmcia.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:23 +0000 (15:55 +0000)]
board/c2mon/pcmcia.c: Fix GCC 4.6 build warning

Fix:
pcmcia.c: In function 'pcmcia_voltage_set':
pcmcia.c:202:21: warning: variable 'cp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/pcmcia/mpc8xx_pcmcia.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:22 +0000 (15:55 +0000)]
drivers/pcmcia/mpc8xx_pcmcia.c: Fix GCC 4.6 build warning

Fix:
mpc8xx_pcmcia.c: In function 'pcmcia_on':
mpc8xx_pcmcia.c:76:8: warning: variable 'slotbit' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agompc8xx/fec.c: Fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:21 +0000 (15:55 +0000)]
mpc8xx/fec.c: Fix GCC 4.6 build warnings

Fix:
fec.c: In function 'fec_pin_init':
fec.c:381:18: warning: variable 'fecp' set but not used
[-Wunused-but-set-variable]
fec.c: In function 'fec8xx_miiphy_write':
fec.c:1013:8: warning: variable 'rdreg' set but not used
[-Wunused-but-set-variable]

Note: The code was slightly rearranged, but no functional changes
attempted, i. e. no conversion to use I/O accessors.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/video/cfb_console.c:Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:20 +0000 (15:55 +0000)]
drivers/video/cfb_console.c:Fix GCC 4.6 build warning

Silence this warning:
cfb_console.c: In function 'video_logo':
cfb_console.c:1563:18: warning: variable 'y_off' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agoboard/tqc/tqm5200/cam5200_flash.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:19 +0000 (15:55 +0000)]
board/tqc/tqm5200/cam5200_flash.c: Fix GCC 4.6 build warning

Fix:
cam5200_flash.c: In function 'flash_erase_32':
cam5200_flash.c:282:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]
cam5200_flash.c: In function 'flash_erase_16':
cam5200_flash.c:612:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/esd/pf5200/pf5200.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:18 +0000 (15:55 +0000)]
board/esd/pf5200/pf5200.c: Fix GCC 4.6 build warning

Fix:
pf5200.c: In function 'do_phypower':
pf5200.c:330:6: warning: variable 'status' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
13 years agoboard/esd/cpci5200/strataflash.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:17 +0000 (15:55 +0000)]
board/esd/cpci5200/strataflash.c: Fix GCC 4.6 build warning

Fix:
strataflash.c: In function 'flash_write_cfiword':
strataflash.c:681:11: warning: variable 'ctladdr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
13 years agoPM520: add missing enable_interrupts()
Wolfgang Denk [Fri, 4 Nov 2011 15:55:16 +0000 (15:55 +0000)]
PM520: add missing enable_interrupts()

The code disabled interrupts in several locations, without re-enabling
them again.  Fix this.

While we are at it, also fix a GCC 4.6 build warning:
flash.c: In function 'flash_erase':
flash.c:373:21: warning: variable 'last' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Josef Wagner <Wagner@Microsys.de>
13 years agofs/fat/fat.c: Fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:15 +0000 (15:55 +0000)]
fs/fat/fat.c: Fix GCC 4.6 build warning

Fix:
fat.c: In function 'fat_register_device':
fat.c:74:19: warning: variable 'info' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/video/videomodes.c: fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:14 +0000 (15:55 +0000)]
drivers/video/videomodes.c: fix GCC 4.6 build warning

Fix:
videomodes.c: In function 'video_get_params':
videomodes.c:162:13: warning: variable 't' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
13 years agodrivers/rtc/rv3029.c: fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:13 +0000 (15:55 +0000)]
drivers/rtc/rv3029.c: fix GCC 4.6 build warnings

Fix:
rv3029.c: In function 'rtc_set':
rv3029.c:98:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
rv3029.c: In function 'set_eere_bit':
rv3029.c:131:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
rv3029.c: In function 'wait_eebusy':
rv3029.c:149:9: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]
rv3029.c: In function 'rtc_reset':
rv3029.c:165:6: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/rtc/ds3231.c: fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:12 +0000 (15:55 +0000)]
drivers/rtc/ds3231.c: fix GCC 4.6 build warnings

Fix:
ds3231.c: In function 'rtc_get':
ds3231.c:90:52: warning: variable 'control' set but not used
[-Wunused-but-set-variable]

Fix is done by switching to standard debug() instead of custom macro.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/mcc200/auto_update.c: fixx GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:11 +0000 (15:55 +0000)]
board/mcc200/auto_update.c: fixx GCC 4.6 build warnings

Fix:
auto_update.c: In function 'do_auto_update':
auto_update.c:344:48: warning: variable 'got_ctrlc' set but not used
[-Wunused-but-set-variable]
auto_update.c:344:18: warning: variable 'bitmap_first' set but not
used [-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/cpu/mpc5xxx/usb_ohci.c: fix GCC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:10 +0000 (15:55 +0000)]
arch/powerpc/cpu/mpc5xxx/usb_ohci.c: fix GCC 4.6 build warnings

Fix:
usb_ohci.c: In function 'dl_transfer_length':
usb_ohci.c:751:8: warning: variable 'tdINFO' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/tqc/tqm5200/cmd_stk52xx.c: fix GC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:09 +0000 (15:55 +0000)]
board/tqc/tqm5200/cmd_stk52xx.c: fix GC 4.6 build warnings

Fix:
cmd_stk52xx.c: In function 'spi_transmit':
cmd_stk52xx.c:85:6: warning: variable 'dummy' set but not used
[-Wunused-but-set-variable]
cmd_stk52xx.c: In function 'i2s_play_wave':
cmd_stk52xx.c:199:3: warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/lib/board.c: fix build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:08 +0000 (15:55 +0000)]
arch/powerpc/lib/board.c: fix build warning

Fix:
board.c: In function 'board_init_r':
board.c:633:8: warning: unused variable 's' [-Wunused-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/lib/board.c: make (mostly) checkpatch-clean
Wolfgang Denk [Fri, 4 Nov 2011 15:55:07 +0000 (15:55 +0000)]
arch/powerpc/lib/board.c: make (mostly) checkpatch-clean

CodingStyle cleanup.

Accepted (in this cleanup) checkpatch messages:

- externs should be avoided
  (to be cleaned up later)
- no spaces at the start of a line
  (accepted in multi-line #if's)
- Macros with complex values
  (false reports)
- do not use assignment in if condition
  (accepted in one place, where avoiding it would have required an
  additional level of nesting, resulting in less readable code)

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/cpu/mpc5xxx/i2c.c: fix GC 4.6 build warnings
Wolfgang Denk [Fri, 4 Nov 2011 15:55:06 +0000 (15:55 +0000)]
arch/powerpc/cpu/mpc5xxx/i2c.c: fix GC 4.6 build warnings

Fix:
i2c.c: In function 'wait_for_bb':
i2c.c:104:16: warning: variable 'temp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
13 years agoboard/mpl/common/flash.c: fix GCC 4.6 build warning
Wolfgang Denk [Fri, 4 Nov 2011 15:55:05 +0000 (15:55 +0000)]
board/mpl/common/flash.c: fix GCC 4.6 build warning

Fix:
../common/flash.c: In function 'flash_erase':
../common/flash.c:603:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Denis Peter <d.peter@mpl.ch>
13 years agoconfig.mk: use memoization in cc-option macro to speed up compilation
Daniel Schwierzeck [Mon, 7 Nov 2011 05:26:43 +0000 (05:26 +0000)]
config.mk: use memoization in cc-option macro to speed up compilation

Apply memoization to cc-option macro by caching the results of the
gcc calls. This macro is called very often so using cached results
leads to faster compilation times.

The old behaviour can be restored by defining the config option
CONFIG_CC_OPT_CACHE_DISABLE=y.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
13 years agosandbox: drop unused return
Mike Frysinger [Wed, 26 Oct 2011 00:22:14 +0000 (00:22 +0000)]
sandbox: drop unused return

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: put stdin into raw mode
Mike Frysinger [Wed, 26 Oct 2011 00:21:29 +0000 (00:21 +0000)]
sandbox: put stdin into raw mode

This allows us to act like a serial device: we get tab chars and CTRL+C
and respond appropriately.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Simon Glass <sjg@chromium.org>
13 years agoserial: sandbox: use ssize_t to match os_read
Mike Frysinger [Wed, 26 Oct 2011 00:21:01 +0000 (00:21 +0000)]
serial: sandbox: use ssize_t to match os_read

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agoserial: sandbox: optimize puts
Mike Frysinger [Wed, 26 Oct 2011 00:20:39 +0000 (00:20 +0000)]
serial: sandbox: optimize puts

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agosandbox/tegra2: fix typo in autocomplete define
Mike Frysinger [Wed, 26 Oct 2011 00:19:58 +0000 (00:19 +0000)]
sandbox/tegra2: fix typo in autocomplete define

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Change md command to use map_physmem
Simon Glass [Tue, 25 Oct 2011 13:51:09 +0000 (13:51 +0000)]
sandbox: Change md command to use map_physmem

Sandbox wants to support commands which use memory. The map_physmen()
call provides this feature, so should be used more consistently in
U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Matthias Weisser <weisserm@arcor.de>
13 years agosandbox: Adjust Makefile so that standalone/api are not built
Simon Glass [Tue, 25 Oct 2011 11:29:28 +0000 (11:29 +0000)]
sandbox: Adjust Makefile so that standalone/api are not built

The check for sandbox architecture is too early in the Makefile, so
standalone and api are built regardless. This moves the check until
after autoconf.mk has been read.

This fixes a build breakage.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Add asm/cache.h for sandbox
Anton staaf [Tue, 25 Oct 2011 10:48:03 +0000 (10:48 +0000)]
sandbox: Add asm/cache.h for sandbox

This file is required by the new DMA buffer alignment macro.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoReduce build times
Wolfgang Denk [Tue, 1 Nov 2011 20:54:02 +0000 (20:54 +0000)]
Reduce build times

U-Boot Makefiles contain a number of tests for compiler features etc.
which so far are executed again and again.  On some architectures
(especially ARM) this results in a large number of calls to gcc.

This patch makes sure to run such tests only once, thus largely
reducing the number of "execve" system calls.

Example: number of "execve" system calls for building the "P2020DS"
(Power Architecture) and "qong" (ARM) boards, measured as:
-> strace -f -e trace=execve -o /tmp/foo ./MAKEALL <board>
-> grep execve /tmp/foo | wc -l

Before: After: Reduction:
==================================
P2020DS 20555 15205 -26%
qong 31692 14490 -54%

As a result, built times are significantly reduced, typically by
30...50%.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Albert Aribaud <albert.aribaud@free.fr>
cc: Graeme Russ <graeme.russ@gmail.com>
cc: Mike Frysinger <vapier@gentoo.org>
Tested-by: Graeme Russ <graeme.russ@gmail.com>
Tested-by: Matthias Weisser <weisserm@arcor.de>
Tested-by: Sanjeev Premi <premi@ti.com>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Macpaul Lin <macpaul@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agopost/post.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:42:23 +0000 (09:42 +0000)]
post/post.c: fix GCC 4.6 build warnings

Fix:
post.c: In function 'post_log':
post.c:425:7: warning: variable 'i' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agopost/post.c: CodingStyle cleanup
Wolfgang Denk [Sat, 29 Oct 2011 09:42:22 +0000 (09:42 +0000)]
post/post.c: CodingStyle cleanup

Make checkpatch-clean..

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
13 years agocommon/cmd_ide.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:41:41 +0000 (09:41 +0000)]
common/cmd_ide.c: fix GCC 4.6 build warnings

Fix:
cmd_ide.c: In function 'ide_ident':
cmd_ide.c:988:6: warning: variable 'do_retry' set but not used
[-Wunused-but-set-variable]

Delete the unused variable.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocommon/cmd_ide.c: CodingStyle cleanup
Wolfgang Denk [Sat, 29 Oct 2011 09:41:40 +0000 (09:41 +0000)]
common/cmd_ide.c: CodingStyle cleanup

Make file acceptable to checkpatch.

This is only a basic clean up to the extend possible without any real
changes to the source code. Warnings due to line over 80 characters
were accepted because these affect only printf()s with user visible
strings.  No attempts were made to fix warnings about volatile and
externs - these need a more thorough cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/rtc/ds1337.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:39:11 +0000 (09:39 +0000)]
drivers/rtc/ds1337.c: fix GCC 4.6 build warnings

Fix:
ds1337.c: In function 'rtc_get':
ds1337.c:88:52: warning: variable 'control' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years ago4xx_pci.c: add error checking, fix GCC 4.6 build warning
Wolfgang Denk [Sat, 29 Oct 2011 09:38:31 +0000 (09:38 +0000)]
4xx_pci.c: add error checking, fix GCC 4.6 build warning

Fix:
4xx_pci.c: In function 'pci_init_board':
4xx_pci.c:855:6: warning: variable 'busno' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoboard/prodrive/p3mx/mv_eth.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:38:21 +0000 (09:38 +0000)]
board/prodrive/p3mx/mv_eth.c: fix GCC 4.6 build warnings

Fix:
mv_eth.c: In function 'mv64460_eth_real_open':
mv_eth.c:471:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_stop':
mv_eth.c:722:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_xmit':
mv_eth.c:796:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_receive':
mv_eth.c:877:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_get_stats':
mv_eth.c:979:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_update_stat':
mv_eth.c:1006:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c:1005:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_print_stat':
mv_eth.c:1087:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2141:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years ago4xx_enet.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:56 +0000 (09:37 +0000)]
4xx_enet.c: fix GCC 4.6 build warnings

Fix:
4xx_enet.c: In function 'enet_rcv':
4xx_enet.c:1772:21: warning: variable 'ef_ptr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
13 years ago4xx_uart.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:52 +0000 (09:37 +0000)]
4xx_uart.c: fix GCC 4.6 build warnings

Fix:
4xx_uart.c: In function 'get_serial_clock':
4xx_uart.c:204:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
13 years agodrivers/net/eepro100.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:48 +0000 (09:37 +0000)]
drivers/net/eepro100.c: fix GCC 4.6 build warnings

Fix:
eepro100.c: In function 'read_hw_addr':
eepro100.c:926:6: warning: variable 'eeprom' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/g2000/strataflash.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:44 +0000 (09:37 +0000)]
board/g2000/strataflash.c: fix GCC 4.6 build warnings

Fix:
strataflash.c: In function 'flash_write_cfiword':
strataflash.c:669:11: warning: variable 'ctladdr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/jse/flash.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:40 +0000 (09:37 +0000)]
board/jse/flash.c: fix GCC 4.6 build warnings

Fix:
flash.c: In function 'flash_erase':
flash.c:304:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]

In addition, remove some dead code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/net/ns8382x.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:34 +0000 (09:37 +0000)]
drivers/net/ns8382x.c: fix GCC 4.6 build warnings

Fix:
ns8382x.c: In function 'ns8382x_check_duplex':
ns8382x.c:704:6: warning: variable 'hun' set but not used
[-Wunused-but-set-variable]

To fix this, we get rid of the NS8382X_DEBUG code and use standard
debug() instead.

This will now trigger a so far undetected warning:
ns8382x.c:780:2: warning: format '%X' expects argument of type
'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]

Fix that, too.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/lib/board.c: fix build warning
Wolfgang Denk [Sun, 23 Oct 2011 11:58:52 +0000 (11:58 +0000)]
arch/powerpc/lib/board.c: fix build warning

Commit 1272592 "powerpc: Use getenv_ulong() in place of getenv(),
strtoul" instroduced a build warning for some PPC systems:

board.c: In function 'board_init_r':
board.c:626: warning: unused variable 's'

Fix it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Wolfgang Denk [Thu, 3 Nov 2011 19:36:16 +0000 (20:36 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

* 'master' of git://git.denx.de/u-boot-mmc:
  tegra2: Move MMC clock initialization into MMC driver
  mmc: sdhci: fix sdma bug for large file transfer
  mmc: sdhci: add timeout for data transfer
  mmc: sdhci: add mmc structure for host
  mmc: sdhci: fix build warning
  mmc: sdhci: fix cache flush
  mmc: CMD7:MMC_CMD_SELECT_CARD response fix
  mmc: test mmc bus width on startup
  mmc: change magic number to macro define
  mmc: mv_sdhci: fix 8bus width access for 88SV331xV5
  mmc: retry the cmd8 to meet 74 clocks requirement in the spec
  PXA: Add MMC driver using the generic MMC framework

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Wolfgang Denk [Thu, 3 Nov 2011 19:36:04 +0000 (20:36 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

* 'master' of git://git.denx.de/u-boot-x86:
  x86: Fix a compiler warning in arch/x86/lib/realmode.c
  x86: Remove the prototype for the unused function board_init
  x86: Rename include/asm/ic to include/asm/arch-sc520
  x86: turn off cache: set control register properly