Stephen Warren [Thu, 28 Feb 2013 15:05:34 +0000 (15:05 +0000)]
cmd_part: don't print cmd name twice in help
The core implementation of "help" already prints the command name before
the help text of a specific command. Remove it from part's own help text
to avoid it being printed twice:
Tegra114 (Dalmore) # help part
part - disk partition related commands
Usage:
part part uuid <interface> <dev>:<part>
- print partition UUID
...
Signed-off-by: Stephen Warren <swarren@nvidia.com>
ps on BSD hosts (like OS X) do not provide the --no-headers switch nor
understand the AIX format descriptions. Unfortunately there seems no solution to
get the PIDs of children in a platfrom independent manner.
Therefore detect the OS and decide upon that which way to go.
This patch makes the MAKEALL script cleanly stoppable on bare OS X when using
the parallel builds of targets.
Additionally this patch removes double call to grep by a single call to sed for
GNU style child PID detection.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Wolfgang Denk [Fri, 8 Mar 2013 10:51:32 +0000 (10:51 +0000)]
Feature Removal: disable "mtest" command by default
The "mtest" command is of little practical use (if any), and
experience has shown that a large number of board configurations
define useless or even dangerous start and end addresses. If not even
the board maintainers are able to figure out which memory range can be
reliably tested, how can we expect such from the end users? As this
problem comes up repeatedly, we rather do not enable this command by
default, so only people who know what they are doing will be
confronted with it.
As this changes the user interface, we allow for a grace period
before this change takes effect. For now, we make "mtest"
configurable through the CONFIG_CMD_MEMTEST variable, which is defined
in include/config_cmd_default.h; we also add an entry to
doc/feature-removal-schedule.txt which announces the removal of this
default setting in two releases from now, i. e. with v2013.07.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com>
mpc512x: Adjust the DRAM init sequence to the datasheet spec
Do maintain a 200 usecs period of stable power and clock before
asserting the CKE signal and sending commands, have at least 200
DRAM clock cycles pass after initialization before data access.
Add new mpc5121e based ac14xx board and a new pinmux config
function for setting individual pinmux bit groups. This
function is used in ac14xx board code.
Remove CSx configurations from board code and only define
required CSx macros in the board config file to configure
chip select windows and parameters.
Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com> Cc: Wolfgang Denk <wd@denx.de>
mpc512x: add common LAW and Chip Select configuration
Currently each mpc512x board has its own LAW and CS config code,
we should avoid this code duplication. Allow all boards to use
common code by only defining LAW and CS config macros like
CONFIG_SYS_CSx_START, CONFIG_SYS_CSx_SIZE and CONFIG_SYS_CSx_CFG.
Also allow common configuration of additional CS parameters by
CONFIG_SYS_CS_ALETIMING, CONFIG_SYS_CS_BURST, CONFIG_SYS_CS_DEADCYCLE
and CONFIG_SYS_CS_HOLDCYCLE options.
Stefan Roese [Thu, 7 Feb 2013 02:10:28 +0000 (02:10 +0000)]
mpc5200: a4m2k: Implement custom "dynamic" watchdog support
This patch adds a custom U-Boot command "wdogtoggle" which enables the
external hardware watchdog toggling via an GPIO pin on the a4m2k
board. After issuing this commands, the watchdog will be serviced
by U-Boot so that the user can use all U-Boot commands from the
prompt.
Stefan Roese [Thu, 7 Feb 2013 02:10:11 +0000 (02:10 +0000)]
mpc5200: Add a4m2k board port
This patch adds the a4m2k MPC5200B board port. Its a derivate of
the a3m071 board with only minor changes.
Additionally this patch includes some clean-up changes:
- Remove I2C support from a3m071 as its unused
- Fix/enhance default env variables
- Fix some comments
- Add newly introduced CONFIG_SPL_TARGET to automatically build
"u-boot-img.bin"
- Fix dtb patching in READ desciption for SPL Linux booting:
"fdt chosen" needs to get called to patch/create the chosen node.
- Add missing call to spl_board_init():
Define CONFIG_SPL_BOARD_INIT so that spl_board_init() will get
called in the SPL version.
Stefan Roese [Thu, 6 Dec 2012 03:41:57 +0000 (03:41 +0000)]
mpc5200: spl_boot.c: Change init oder to first enable printf
On MPC5200, the initial RAM (and gd) is located in the internal
SRAM. So we can actually call the preloader console init code
before calling initdram(). This makes serial output (printf)
available very early, even before SDRAM init, which has been
an U-Boot priciple from day 1.
Simon Glass [Thu, 28 Feb 2013 19:26:17 +0000 (19:26 +0000)]
x86: Adjust link device tree include file
This is currently set to coreboot.dtsi, but we cannot support this on
old device tree compilers (dtc <= 1.3), so adjust to use ARCH_CPU_DTS
to let the Makefile preprocessor sort this out.
Simon Glass [Thu, 28 Feb 2013 19:26:16 +0000 (19:26 +0000)]
x86: Add error checking to x86 relocation code
This does not actually change normal behaviour, but adds a check that
should detect corruption of relocation data (e.g. by using BSS data
prior to relocation).
Also add additional debugging output when enabled.
During this investigation, two situations have been seen:
1. calculate_relocation_address():
uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;
turns into 111166f: b8 83 c4 17 01 mov $0x117c483,%eax
Simon Glass [Thu, 28 Feb 2013 19:26:10 +0000 (19:26 +0000)]
x86: Add function to get top of usable ram
The memory layout calculations are done in calculate_relocation_address(),
and coreboot has its own version of this function. But in fact all we
really need is to set the top of usable RAM, and then the base version
will work as is.
So instead of allowing the whole calculate_relocation_address() function
to be replaced, create board_get_usable_ram_top() which can be used by
a board to specify the top of the area where U-Boot relocations to.
bootm: fix conditional compilation for bootm ramdisk subcommand
All code related to the bootm ramdisk subcommand is conditionally
enabled by CONFIG_SYS_BOOT_RAMDISK_HIGH except for the help message.
Replace the CONFIG_ARCH defines by CONFIG_SYS_BOOT_RAMDISK_HIGH
to fix this.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Joe Hershberger [Thu, 1 Nov 2012 16:54:18 +0000 (16:54 +0000)]
ubifs: Allow ubifsmount volume reference by number
UBI can mount volumes by name or number The current code forces you
to name the volume by prepending every name with "ubi:".
>From fs/ubifs/super.c
* There are several ways to specify UBI volumes when mounting UBIFS:
* o ubiX_Y - UBI device number X, volume Y;
* o ubiY - UBI device number 0, volume Y;
* o ubiX:NAME - mount UBI device X, volume with name NAME;
* o ubi:NAME - mount UBI device 0, volume with name NAME.
Now any name passed in any of the above forms are allowed.
Also update the configs that referenced ubifsmount.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Simon Glass [Wed, 26 Dec 2012 09:53:36 +0000 (09:53 +0000)]
sandbox: Add 'sb' command to access filesystem features
The new 'sb' command is intended to deal with sandbox-specific features
that have no parallel in other archs. This commit adds two sub-commands
to list a directory and read a file from the host filesystem.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Wed, 26 Dec 2012 09:53:33 +0000 (09:53 +0000)]
fs: Move ls and read methods into ext4, fat
It doesn't make a lot of sense to have these methods in fs.c. They are
filesystem-specific, not generic code. Add each to the relevant
filesystem and remove the associated #ifdefs in fs.c.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Wed, 26 Dec 2012 09:53:31 +0000 (09:53 +0000)]
fs: Tell probe functions where to put their results
Rather than rely on global variables for the probe functions, pass in
the information that we need filled in. This allows us to potentially
keep the variables private to fs.c in the future, and the meaning of
the probe function is clearer.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Wed, 26 Dec 2012 09:53:30 +0000 (09:53 +0000)]
fs: Use filesystem methods instead of switch()
We can use the available methods and avoid using switch(). When the
filesystem is not supported, we fall through to the 'unsupported'
methods: fs_probe_unsupported() prints an error, so the others do
not need to.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass [Wed, 26 Dec 2012 09:53:29 +0000 (09:53 +0000)]
fs: Fully populate the filesystem method struct
There is a structure in fs.c with just a probe method. By adding methods
for other operations, we can avoid lots of #ifdefs and switch()s. As a
first step, create the structure ready for use.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
Steven Miao [Sat, 31 Mar 2012 08:01:50 +0000 (16:01 +0800)]
blackfin: bf60x: add resume from hibernate
Add Bf60x resume from hibernate support
Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Scott Jiang [Tue, 29 Nov 2011 23:03:26 +0000 (18:03 -0500)]
blackfin: add bf6xx spi driver
Spi driver for bf60x is different from old one, so implement a new
driver for it.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Simon Glass [Sun, 24 Feb 2013 17:33:32 +0000 (17:33 +0000)]
hash: Use lower case for hash algorithm names
Rather than use strcasecmp() in the hash algorithm search, require the
caller to do this first. Most of U-Boot can use lower case anyway, and
the hash command can convert to lower case before calling hash_command().
This saves needing strcasecmp() for boards that use hashing but not
the hash command.
Simon Glass [Sun, 24 Feb 2013 20:29:23 +0000 (20:29 +0000)]
sandbox: config: Enable hash functions and mtest
Enable the hash command and sha1/256 hashing for sandbox. Also use a
better address for memory testing (since the existing one is set up
for linux host memory space).
Simon Glass [Sun, 24 Feb 2013 20:30:22 +0000 (20:30 +0000)]
Roll crc32 into hash infrastructure
Add the CRC32 algorithm to the list of available hashes, and make
the crc32 command use hash_command(). Add a new crc32_wd_buf() to
make this possible, which puts its result in a buffer rather than
returning it as a 32-bit value.
Note: For some boards the hash command is not enabled, neither
are sha1, sha256 or the verify option. In this case the full
hash implementation adds about 500 bytes of overhead. So as a
special case, we use #ifdef to select very simple bahaviour in
that case. The justification for this is that it is currently
a very common case (virtually all boards enable crc32 but only
some enable more advanced features).
Simon Glass [Sun, 24 Feb 2013 17:33:26 +0000 (17:33 +0000)]
hash: Add a flag to support saving hashes in the environment
Some hashing commands permit saving the hash in an environment variable,
and verifying a hash from there. But the crc32 command does not support
this. In order to permit crc32 to use the generic hashing infrastructure,
add a flag to select which behaviour to use.
Simon Glass [Sun, 24 Feb 2013 17:33:20 +0000 (17:33 +0000)]
Reduce casting in mtest
Use a ulong for the command arguments, and only cast to an address when
needed. This fixes warnings in sandbox where pointers are typically 64 bits
long.
Simon Glass [Sun, 24 Feb 2013 17:33:16 +0000 (17:33 +0000)]
Split out the memory tests into separate functions
Half of the code is currently hidden behind an #ifdef. Move the two
memory tests into their own functions and use the compiler to eliminate
the unused code.
Simon Glass [Sun, 24 Feb 2013 17:33:14 +0000 (17:33 +0000)]
sandbox: Add un/map_sysmen() to deal with sandbox's ram_buf
Sandbox doesn't actually provide U-Boot access to the machine's physical
memory. Instead it provides a RAM buffer of configurable size, and all
memory accesses are within that buffer. Sandbox memory starts at 0 and
is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer
might produce unpredictable results in the event of an error, and would
expose the host machine's memory architecture to the sandbox U-Boot.
Most U-Boot functions assume that they can just access memory at given
address. For sandbox this is not true.
Add a map_sysmem() call which converts a U-Boot address to a system
address. In most cases this is a NOP, but for sandbox it returns a
pointer to that memory inside the RAM buffer.
To get a U-Boot feature to work correctly within sandbox, you should call
map_sysmem() to get a pointer to the address, and then use that address for
any U-Boot memory accesses.
Taylor Hutt [Sun, 24 Feb 2013 17:33:13 +0000 (17:33 +0000)]
sandbox: Improve sandbox serial port keyboard interface
Implements the tstc() interface for the serial driver. Multiplexing
the console between the serial port and a keyboard uses a polling
method of checking if characters are available; this means that the
serial console must be non-blocking when attempting to read
characters.
Signed-off-by: Taylor Hutt <thutt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Sun, 24 Feb 2013 17:33:12 +0000 (17:33 +0000)]
Update print_buffer() to use const
The buffer cannot be changed by this function, so change the buffer
pointer to a const. This allows callers with const pointer to use the
function without a cast.
Phil Sutter [Thu, 21 Feb 2013 17:21:56 +0000 (18:21 +0100)]
common/env_nand.c: calculate crc only when readenv was OK
Calculating the checksum of incompletely read data is useless.
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
[scottwood@freescale.com: minor formatting fix] Signed-off-by: Scott Wood <scottwood@freescale.com>
Phil Sutter [Thu, 21 Feb 2013 17:21:55 +0000 (18:21 +0100)]
env_nand.c: clarify log messages when env reading fails
The single message is misleading, since there is no equivalent success
note when reading the other copy succeeds. Instead, warn if one of the
redundant copies could not be loaded and emphasise on the error when
reading both fails.
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Joe Hershberger [Fri, 8 Feb 2013 09:27:19 +0000 (09:27 +0000)]
mtd: nand: Check if NAND is locked tight before lock cmds
If the NAND is locked tight, commands such as lock and unlock will not
work, but the NAND chip may not report an error. Check the lock tight
status before attempting such operations so that an error status can be
reported if we know the operation will not succeed.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Allen Martin [Tue, 29 Jan 2013 14:34:58 +0000 (14:34 +0000)]
MAKEALL: add support for per architecture toolchains
Add support for per architecture CROSS_COMPILE toolchain definitions
via CROSS_COMPILE_ARCH where "ARCH" is any of the supported u-boot
architectures. This allows building every supported u-boot board in a
single pass of MAKEALL.
Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
Piotr Wilczek [Sun, 27 Jan 2013 22:59:25 +0000 (22:59 +0000)]
gpt: fix partion size limit
Currently, in gpt command, partion size is converted from string
to unsigned long type using 'ustrtol' function. That type limits
the partition size to 4GB.
This patch changes the conversion function to 'ustrtoll' to return
unsigned long long type.
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
mac: Fix the condition check for setting the MAC from the EEPROM
The issue got introduced in a cleanup by Manjunath Hadli in commit 826e99136e2bce61f3f6572e32d7aa724c116e6d. The eth_getenv_enetaddr_by_index
method will validate the MAC addr and if none is set in the environment
0 will be returned. Set the MAC from the eeprom if no valid address
is found in environment.
Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>