Commit Graph

14340 Commits

Author SHA1 Message Date
Wolfgang Denk 40ac78a949 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>
2011-11-07 22:09:58 +01:00
Wolfgang Denk b633741bcd 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>
2011-11-07 22:09:54 +01:00
Wolfgang Denk 397b40caf2 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>
2011-11-07 22:09:50 +01:00
Wolfgang Denk 55b97886f8 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>
2011-11-07 22:09:46 +01:00
Wolfgang Denk a442173048 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>
2011-11-07 22:09:42 +01:00
Wolfgang Denk 65766f3852 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>
2011-11-07 22:09:39 +01:00
Wolfgang Denk 1c2931d4ec 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>
2011-11-07 22:09:35 +01:00
Wolfgang Denk 9b998b0c52 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>
2011-11-07 22:09:31 +01:00
Wolfgang Denk 9306749752 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>
2011-11-07 22:09:27 +01:00
Wolfgang Denk ee6ed89c5b 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>
2011-11-07 22:09:23 +01:00
Daniel Schwierzeck b6a467d73d 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>
2011-11-07 21:56:11 +01:00
Mike Frysinger fec79acc86 sandbox: drop unused return
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
2011-11-03 22:35:25 +01:00
Mike Frysinger ab06a758b9 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>
2011-11-03 22:35:21 +01:00
Mike Frysinger ec8f0b9024 serial: sandbox: use ssize_t to match os_read
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
2011-11-03 22:35:16 +01:00
Mike Frysinger 5778d54afc serial: sandbox: optimize puts
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
2011-11-03 22:35:12 +01:00
Mike Frysinger ed0fc4b172 sandbox/tegra2: fix typo in autocomplete define
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
2011-11-03 22:35:06 +01:00
Simon Glass 355a835747 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>
2011-11-03 22:35:01 +01:00
Simon Glass b5728756e8 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>
2011-11-03 22:34:57 +01:00
Anton staaf cceea66bfe 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>
2011-11-03 22:34:49 +01:00
Wolfgang Denk cca4e4aec1 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>
2011-11-03 20:44:58 +01:00
Wolfgang Denk 4d6402b012 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>
2011-11-03 20:44:18 +01:00
Wolfgang Denk 50da837663 post/post.c: CodingStyle cleanup
Make checkpatch-clean..

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-03 20:43:51 +01:00
Wolfgang Denk a2b92a655a 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>
2011-11-03 20:41:47 +01:00
Wolfgang Denk 34c202c7eb 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>
2011-11-03 20:41:32 +01:00
Wolfgang Denk 88b2533de0 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>
2011-11-03 20:41:14 +01:00
Wolfgang Denk e5d5ed4b20 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>
2011-11-03 20:40:38 +01:00
Wolfgang Denk ec98a9bd4e 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>
2011-11-03 20:40:30 +01:00
Wolfgang Denk f4d9f2da2a 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>
2011-11-03 20:40:00 +01:00
Wolfgang Denk 32bb34a768 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>
2011-11-03 20:39:49 +01:00
Wolfgang Denk 3d458d2dfb 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>
2011-11-03 20:39:35 +01:00
Wolfgang Denk a0f21ff18a 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>
2011-11-03 20:39:23 +01:00
Wolfgang Denk 8e119b03c5 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>
2011-11-03 20:39:10 +01:00
Wolfgang Denk 675b46bbac 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>
2011-11-03 20:38:49 +01:00
Wolfgang Denk a9f4fc3fe5 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>
2011-11-03 20:37:27 +01:00
Wolfgang Denk 24769c151e 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
2011-11-03 20:36:16 +01:00
Wolfgang Denk e84fb175f6 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
2011-11-03 20:36:04 +01:00
Wolfgang Denk b2b4449aa7 Merge branch 'master' of git://git.denx.de/u-boot-nds32
* 'master' of git://git.denx.de/u-boot-nds32:
  nds32: asm/io.h: add __iormb __iowmb and inline io support
  nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
  nds32: Use getenv_ulong() in place of getenv(), strtoul
2011-11-03 20:35:45 +01:00
Wolfgang Denk 7a34106611 e1000: fix bugs from recent commits
Commit 114d7fc0 "e1000: Rewrite EEPROM checksum error to give more
information" failed to initialize the checksum variable which should
result in random results. Fix that.

Commit 2326a94d caused a ton of "unused variable 'x'" warnings.
Fix these.  While we are at it, remove some bogus parens.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
2011-11-03 20:33:19 +01:00
Stephen Warren de71fbe468 tegra2: Move MMC clock initialization into MMC driver
This centralizes knowledge of MMC clocking into the MMC driver. This also
removes clock setup from the board files, which will simplify later changes
that modify the Harmony board to support the correct set of MMC controllers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2011-11-03 02:15:00 -05:00
Lei Wen 3e81c77240 mmc: sdhci: fix sdma bug for large file transfer
SDHCI spec need to reset the sdma base address while the software
try to accorss the 512k bytes address boundary. When meet such
accross behavior, sdhci controller would generate a interrupt
automatically, and software need handle this.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:15:00 -05:00
Lei Wen a004abde88 mmc: sdhci: add timeout for data transfer
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:14:59 -05:00
Lei Wen 6cf1b17cd0 mmc: sdhci: add mmc structure for host
So that sdhci host would tell in the driver that the mmc current
attributes.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:14:59 -05:00
Lei Wen 0d2f15f9c7 mmc: sdhci: fix build warning
If CONFIG_MMC_SDHCI_IO_ACCESSORS is defined, the following warning would
shows up:

include/sdhci.h:224: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:224: warning: its scope is only this definition or
declaration, which is probably not what you want
include/sdhci.h:225: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:226: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:227: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:228: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:229: warning: 'struct sdhci_host' declared inside
parameter list

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:14:59 -05:00
Lei Wen 2c2ec4c969 mmc: sdhci: fix cache flush
Only flush the memory range needed.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:14:59 -05:00
Ajay Bhargav fe8f7066d3 mmc: CMD7:MMC_CMD_SELECT_CARD response fix
As per JEDEC document JESD84-A441 (page 105) response for CMD7
(MMC_CMD_SELECT_CARD) response should be R1 instead of R1b. In uboot we
never take MMC to disconnected state and on powerup its always ideal
state which later goes to stand-by state.

from document footnote:
R1 while selecting from Stand-By State to Transfer State; R1b while
selecting from Disconnected State to Programming State.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
2011-11-03 02:14:59 -05:00
Lei Wen 4137894e04 mmc: test mmc bus width on startup
For we don't know mmc bus width from reading registers, the only way
to check is to test.

Current compare offset is:
EXT_CSD_PARTITIONING_SUPPORT
EXT_CSD_ERASE_GROUP_DEF
EXT_CSD_REV
EXT_CSD_HC_ERASE_GRP_SIZE
EXT_CSD_SEC_CNT

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:14:59 -05:00
Lei Wen 0560db18ec mmc: change magic number to macro define
Previous magic number is hard to parse its meaning, change it to
respective macro definition

Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: WOlfgang Denk <wd@denx.de>
2011-11-03 02:14:58 -05:00
Lei Wen 02d3ad3e19 mmc: mv_sdhci: fix 8bus width access for 88SV331xV5
Marvell 88SV331xV5 platform's sdhci host control is not very standard
with the spec in the 8bit handling. It need to set its private register
to switch to the 8bit mode which is not included in the standard sdhci
registers.

This patch mainly hacks the writeb method, and set its private register
if it find the driver is going to switch to the 8bit mode.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-11-03 02:14:58 -05:00
Lei Wen 02f3029f18 mmc: retry the cmd8 to meet 74 clocks requirement in the spec
For some controller it has dynamic clock gating, and only toggle out clk
when the first cmd0 send out, while some card strictly obey the 74
clocks rule, the interval may not be sufficient between the cmd0 and
this cmd8, retry to fulfil the clock requirement.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-03 02:14:58 -05:00
Marek Vasut 07133f2e7b PXA: Add MMC driver using the generic MMC framework
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-03 02:14:58 -05:00