John Schmoller [Fri, 12 Mar 2010 15:49:24 +0000 (09:49 -0600)]
cmd history: Match history buffer size to console buffer
Match history buffer size to console buffer size. History buffer size
was hard coded to 256, artificially limiting the command buffer size.
The history buffer now tracks CONFIG_SYS_CBSIZE.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
John Schmoller [Fri, 12 Mar 2010 15:49:23 +0000 (09:49 -0600)]
console: Fix console buffer overrun
When CONFIG_SYS_CBSIZE equals MAX_CMDBUF_SIZE, a command string of
maximum length will overwrite part of the history buffer, causing the
board to die. Expand the console_buffer and hist_lines buffer by one
character each to hold the missing NULL char.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Michael Zaidman [Mon, 1 Mar 2010 09:47:36 +0000 (11:47 +0200)]
POST: add progress API
Add POST progress API implemented as weak calls before and after
each call to the POST test callback in the post_run_single routine
of the post.c file.
Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de>
cmd_setexpr: allow memory addresses in expressions
This patch add functionality to use memory addresses in expressions.
This increases the power of expressions substantially
It adheres to the standard convemtions: memory addresses can be given
in the format *address (e.g. *1000)
Rationale for this change is that it allows masking off bits from a
byte that is obtained by reading data from e.g. i2c.
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Fix warning: control reaches end of non-void function Signed-off-by: Wolfgang Denk <wd@denx.de>
according to some of the comments the subaddress length is 1 or 2, but we are being
prepared for the case it becomes 3. However the code also accepted 4.
This repairs this by changing the constand 4 to 3.
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Matthias Weisser [Tue, 12 Jan 2010 11:06:31 +0000 (12:06 +0100)]
video: Fix console display when splashscreen is used
If a splashscreen is used the console scrolling used the
scroll size as needed when a logo was displayed. This
patch sets the scroll size to the whole screen if
a splashscreen is shown.
Jeff Angielski [Wed, 17 Mar 2010 19:09:26 +0000 (15:09 -0400)]
env: fix endian ordering in crc table
The crc table was being built as little endian for big endian
targets. This would cause fw_printenv to always fail with
"Warning: Bad CRC, using default environment" messages.
Signed-off-by: Jeff Angielski <jeff@theptrgroup.com> Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Fix warnings while compiling with CONFIG_VIDEO enabled:
diu.c: In function 'video_hw_init':
diu.c:158: warning: 'return' with no value, in function returning non-void
diu.c:162: warning: format '%ld' expects type 'long int', but argument 6 has type 'int'
diu.c:162: warning: format '%ld' expects type 'long int', but argument 7 has type 'int'
If a board uses cfb_console driver and splash image
and also defines CONFIG_SILENT_CONSOLE, the user is
locked out even if "silent" is not set. It is not
possible to get any output, neither on vga console
device nor on serial console after redirecting the
output to the serial console, since the GD_FLG_SILENT
flag remains set.
Fix the problem by redirecting the output from frame
buffer to serial console if splashimage is used.
Only suppress the output if "silent" environment
variable was set and don't set the GD_FLG_SILENT
flag arbitrarily.
Signed-off-by: Thomas Weber <swirl@gmx.li>
Add some more: neither Makefile nor config.mk need execute permissions. Signed-off-by: Wolfgang Denk <wd@denx.de>
Stefano Babic [Sat, 13 Mar 2010 20:09:00 +0000 (21:09 +0100)]
mxcmmc: fix warnings due to access 32 bit registers with 16 bit accessors
Some registers of the mxcmmc driver were accessed using
16 bit accessor functions, because only the LSB is
significant. This is not needed and generates
warnings.
Wolfgang Denk [Sun, 17 Jan 2010 22:55:53 +0000 (23:55 +0100)]
TFTP: allow for adjustable retransmission timout
So far, TFTP negotiated a fixed retransmission timeout of 5 seconds.
In some cases (busy networks, slow TFTP servers) this caused very
slow transfers. A new environment variable "tftptimeout" allows to
set this timeout. Lowering this value may make downloads succeed
faster in networks with high packet loss rates or with unreliable
TFTP servers.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This patch removes the \n after the help message for mmcinfo.
This resulted in an empty line being displayed after the mmcinfo line
when the help command was given.
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Matthias Weisser [Tue, 12 Jan 2010 11:06:31 +0000 (12:06 +0100)]
video: Fix console display when splashscreen is used
If a splashscreen is used the console scrolling used the
scroll size as needed when a logo was displayed. This
patch sets the scroll size to the whole screen if
a splashscreen is shown.
Wolfgang Denk [Fri, 12 Mar 2010 21:11:00 +0000 (22:11 +0100)]
standalone eepro100_eeprom: fix build error
Building examples/standalone/eepro100_eeprom triggers this error:
In file included from include/common.h:629,
from eepro100_eeprom.c:24:
include/net.h: In function 'NetReadIP':
include/net.h:430: warning: implicit declaration of function 'memcpy'
eepro100_eeprom.c: At top level:
eepro100_eeprom.c:81: error: conflicting types for 'memcpy'
include/net.h:430: error: previous implicit declaration of 'memcpy' was here
The length of configured MTDPARTS_DEFAULT string
could be greater than console printbuffer size.
Replace printf() by puts() to avoid potential buffer
overflows.
Wolfgang Denk [Thu, 11 Mar 2010 22:56:03 +0000 (23:56 +0100)]
Move CONFIG_UPDATE_TFTP code after CONFIG_PREBOOT
The auto-update feature (CONFIG_UPDATE_TFTP) requires that the env
variable serverip be set for the TFTP access. If DHCP is to be used
to get the serverip env variable, this doesn't work as DHCP happens
after the auto-update attempt has run. A solution is to run DHCP in
PREBOOT, but even this is too late.
To solve this, we move update_tftp() below the PREBOOT stuff.
Mike Frysinger [Mon, 25 Jan 2010 23:50:11 +0000 (18:50 -0500)]
mkimage: dont force entry point with xip
Some people boot images with the entry point in the middle of the blob
(like Linux with the head code in discardable .init.text), and there is no
no real requirement that the entry point be right after the mkimage header
when doing XIP, so let people specify whatever they want. If they do need
an entry right after the header, then they still can do that with normal
-e behavior.
Wolfgang Denk [Thu, 11 Mar 2010 22:35:43 +0000 (23:35 +0100)]
Fix memory leak in mmc_read()
There is be a path through mmc_read in drivers/mmc/mmc.c where
malloc'd memory is not freed before exiting mmc_read: it occurs if
mmc_set_blocklen() returns a non-zero value.
Reported-by: Quentin Armitage <Quentin@Armitage.org.uk> Signed-off-by: Wolfgang Denk <wd@denx.de>
Stefano Babic [Fri, 5 Mar 2010 16:54:37 +0000 (17:54 +0100)]
MX51: removed warnings for the mx51evk
The patch removes warnings at compile time and provides
some cleanup code:
- Removed comment on NAND (not yet supported) from lowlevel_init.S
- Removed NFMS bit definition from imx-regs.h
The bit is only related to MX.25/35 and can lead to confusion
- Moved is_soc_rev() to soc specific code (removed from mx51evk.c)
Heiko Schocher [Mon, 22 Feb 2010 11:13:02 +0000 (16:43 +0530)]
arm: add support for the suen3 board from keymile
Add support for the ARM part of the mgcoge2, named suen3.
This board is based on the Marvell Kirkwood (88F6281) SoC.
As there come more board variants, common config options
are collected in include/configs/km_arm.h. Also, this board
use common code for all keymile boards, which is stored in
board/keymile/common/common.c
John Rigby [Tue, 26 Jan 2010 06:12:58 +0000 (23:12 -0700)]
Add support for KARO TX25 board
This is an i.MX25 base board with only NAND
so it uses nand_spl to boot.
Signed-off-by: John Rigby <jcrigby@gmail.com>
Tune configuration, add support for (redundant) environment in NAND. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> CC: Fred Fan <fanyefeng@gmail.com> CC: Tom <Tom.Rix@windriver.com>
John Rigby [Tue, 26 Jan 2010 06:12:55 +0000 (23:12 -0700)]
fec_mxc: cleanup and factor out MX27 dependencies
general cleanup
move clock init to cpu_eth_init in cpu/arm926ejs/mx27/generic.c
make MX27 specific phy init conditional on CONFIG_MX27
replace call to imx_get_ahbclk with one to imx_get_fecclk
and define imx_get_fecclk in include/asm-arm/arch-mx27/clock.h
Signed-off-by: John Rigby <jcrigby@gmail.com> CC: Ben Warren <biggerbadderben@gmail.com> CC: Fred Fan <fanyefeng@gmail.com> CC: Tom <Tom.Rix@windriver.com>
John Rigby [Tue, 26 Jan 2010 06:12:56 +0000 (23:12 -0700)]
Add support for Freescale MX25 SOC
ARM926EJS core with MX31 peripherals.
Signed-off-by: John Rigby <jcrigby@gmail.com>
Earlier Version Signed-off-by: Wolfgang Denk <wd@denx.de> CC: Fred Fan <fanyefeng@gmail.com> CC: Tom <Tom.Rix@windriver.com>
Stefano Babic [Fri, 5 Feb 2010 14:11:27 +0000 (15:11 +0100)]
fsl_esdhc: add support for mx51 processor
The esdhc controller in the mx51 processor is quite
the same as the one in some powerpc processors
(MPC83xx, MPC85xx). This patches adapts the driver
to support the arm mx51.
Stefano Babic [Fri, 5 Feb 2010 14:07:33 +0000 (15:07 +0100)]
ARM: add accessors functions
Some Freescale's processors of different architecture
have the same peripheral (eSDHC controller in PowerPC
and i.MX51). This patch adds accessors for
the internal registers of the SOCs, as already
implemented in the PowerPC architecture.
Stefano Babic [Fri, 5 Feb 2010 14:04:43 +0000 (15:04 +0100)]
MMC: add weak function to detect MMC/SD card
Most controllers can check if there is a card in the slot.
However, they require pins that could be not available because
required by other functions and the detection of a card must
be performed in another way. This patch adds a weak function
that a board can implement to add its internal custom way
to check the presence of a MMC/SD card.
Stefano Babic [Wed, 20 Jan 2010 17:20:39 +0000 (18:20 +0100)]
mmc: check correctness of the voltage mask in ocr
Most cards do not answer if some reserved bits
in the ocr are set. However, some controllers
can set bit 7 (reserved for low voltages), but
how to manage low voltages SD card is not yet
specified.
edb93xx: Fix SDRAM initialization by issuing a precharge all command before
forcing the precharge and select mode register update mode before programming
the mode registers. Write to the SDRAM banks in order to force a precharge,
reading causes the edb93xx boards to hang
ep93xx: Refactoring of the timer code, including the following changes
* use a free running timer instead of a periodical one
* use unsigned long long for total number of ticks
* hold the timer state in a structure instead of separate variables
* increment the timer counter instead of decrementing it
* remove unused function udelay_masked()
* remove unused function set_timer()
OMAP3: workaround for ARM Cortex-A8 erratum 725233
725233: PLD instructions executed with PLD data forwarding
enabled can result in a processor deadlock
This deadlock can happen when NEON load instructions are used together
with cache preload instructions (PLD). The problematic conditions
can be triggered in-the-wild by NEON optimized functions from pixman
library (http://cgit.freedesktop.org/pixman), which perform dynamic
adjustment of prefetch distance.
The workaround disables PLD data forwarding by setting PLD_FWD bit
in L2 Cache Auxiliary Control Register as recommended in ARM Cortex-A8
errata list.
The deadlock can only happen on r1pX revisions of Cortex-A8 (used in
OMAP34xx/OMAP35xx). Performance impact of the workaround is practically
non-existant.
Ladislav Michl [Thu, 18 Feb 2010 02:29:45 +0000 (21:29 -0500)]
VoiceBlue: fix linker errors
linking eeprom with libgeneric.a is not really needed and causes following
error:
../../lib_generic/libgeneric.a(string.o): In function `strcmp':
/home/ladis/src/u-boot-ti/lib_generic/string.c:152: multiple definition of `strcmp'
../../examples/standalone/libstubs.a(stubs.o):include/_exports.h:24: first defined here
make[1]: *** [eeprom.srec] Error 1
Fix undefined reference to memset generated by some versions of gcc
to zero out initialized structure on the stack:
eeprom.o: In function `eeprom':
board/voiceblue/eeprom.c:152: undefined reference to `memset'
make[1]: *** [eeprom] Error 1
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Nick Thompson [Thu, 18 Feb 2010 01:37:24 +0000 (20:37 -0500)]
da830evm: Add support for TI EMAC
Adds support for ethernet networking on the da830evm platform.
This platform uses an SoC EMAC interface and a 3 port ethernet
switch as a PHY with an RMII interface. The PHY also has a i2c
interface for configuring the switch functions.
Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Ladislav Michl [Mon, 8 Feb 2010 19:15:47 +0000 (14:15 -0500)]
NetStar: eeprom - fix linker error
linking eeprom with libgeneric.a is not really needed and causes following
error:
../../lib_generic/libgeneric.a(string.o): In function `strcmp':
lib_generic/string.c:152: multiple definition of `strcmp'
../../examples/standalone/libstubs.a(stubs.o):include/_exports.h:24: first defined here
Remove eeprom linker script as well and generate entry point object
(to start application by jumping on its beginning) on the fly.
Out-of-tree build tested as well.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Ladislav Michl [Mon, 8 Feb 2010 19:15:15 +0000 (14:15 -0500)]
NetStar: eeprom - undefined reference to `memset'
Defining partially initialized struct eth_device on stack means
gcc has to zero out it, and some gcc versions optimize this with
an implicit call to memset. Move definition to data section
to avoid that (it has also nice side effect that we need not
to pass it to helper functions anymore)
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Wolfgang Wegner [Tue, 2 Mar 2010 09:59:19 +0000 (10:59 +0100)]
] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM
For platforms with flash below ram addresses, the current check to
activate monitor protection is wrong/insufficient. This patch fixes
CONFIG_MONITOR_IS_IN_RAM for these systems by adding a check for
this configuration.
Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de> Signed-off-by: Stefan Roese <sr@denx.de>
Wolfgang Wegner [Tue, 2 Mar 2010 09:59:20 +0000 (10:59 +0100)]
allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
CONFIG_MONITOR_IS_IN_RAM is broken for MCF532x. This patch fixes this
by conditionally
- removing the vector table at the beginning of code
- not overwriting the vector base register
- removing the code to re-set the PLL, which effectively disables
SDRAM access
Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
MCF5271-only: Added a weak board_reset function to allow custom reset
This patch adds a board_reset function to allow boards to specify
their own custom reset sequence (e.g. resetting by timing out watchdog).
Tested only on MCF5271, can be expanded if needed.
Based on Mike Frysinger's suggestion on:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/70304
Signed-off-by: Richard Retanubun <RichardRetanubun at RuggedCom.com>
Wolfgang Wegner [Wed, 28 Oct 2009 20:11:00 +0000 (15:11 -0500)]
MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE
in cpu/mcf532x/start.S, the function icache_enable enables the cache for
a fixed 32MB region starting at the SDRAM start address; this patch
changes the function to cover the region defined by CONFIG_SYS_SDRAM_SIZE
Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
Wolfgang Wegner [Wed, 9 Dec 2009 22:32:12 +0000 (17:32 -0500)]
add include/asm-m68k/unaligned.h
lib_generic/zlib.c needs include/asm/unaligned.h since commit cd514aeb996e2f7aefbe1f78481965d9d074aed4, which broke compilation for
Coldfire/M68K. This patch adds the missing header for these
architectures.
Signed-off-by: Wolfgang Wegner <w.wegner at astro-kom.de>
sh: Add asm/unaligned.h and asm/unaligned-sh4a.h from Linux kernel
zlib.c demands asm/unaligned.h. But, SH does not have these.
This commit add asm/unaligned.h and asm/unaligned-sh4a.h from Linux
kernel and modifyf for u-boot.
Kim Phillips [Mon, 1 Mar 2010 17:10:17 +0000 (11:10 -0600)]
mpc83xx: fix out-of-tree mpc8315 nand build
commit 2e95004deb6e33e33bf1b8a92a38cd2115bac4c2 "mpc83xx: Add NAND boot support
for MPC8315E-RDB boards" symlinked nand_spl/board/freescale/mpc8315erdb to
mpc8313erdb in order to not duplicate code.
Since the main makefile builds nand_spl/board/$(BOARDDIR) (which makes sense),
and the board Makefile and linker script are the only two necessary files
to enable out-of-tree building, and other boards have duplicated nand makefiles
(e.g. 8536ds & 8569mds), it only seems prudent to copy these two files in the
name of the 8315 too.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Wolfgang Denk <wd@denx.de>