summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2013-03-15x86: Enable generic board supportSimon Glass
This enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15x86: Adjust board_r.c for x86Simon Glass
For x86 the global_data is managed entirely by the start.S code so we do not need to touch it. However, we do have some more initcalls to add. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15x86: Adjust board_f.c for x86Simon Glass
For x86, things have adjusted somewhat since this series was originally written. It has its own way of running through initcalls which is actually nicer than others archs. Unfortunately this does introduce exceptions. We will soon require use of generic board on x86, but until then we need to fit in with what is there, and treat x86 as a special case. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Adjust board_r.c for ppcSimon Glass
This adds ppc features to the generic post-relocation board init. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Adjust board_f.c for ppcSimon Glass
This adds ppc features to the generic pre-relocation board init. This is a separate commit so that these features are clearly shown. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Add CONFIG_SYS_SYM_OFFSETS to support offset symbolsSimon Glass
Link symbols as created by the link script can either be absolute or relative to the text start. This option switches between the two options so that we can support both. As we convert architectures over to generic board, we can see if this option is actually needed, or whether it is possible to unify this feature also. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Add spl load featureSimon Glass
This adds secondary program loader support to the generic board. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Introduce generic post-relocation board_r.cSimon Glass
This file handles common post-relocation init for boards which use the generic framework. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-15Introduce generic pre-relocation board_f.cSimon Glass
This file handles common pre-relocation init for boards which use the generic framework. It starts up the console, DRAM, performs relocation and then jumps to post-relocation init. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
2013-03-12cmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not setTom Rini
mem_test_quick and mem_test_alt functions are only called by do_mem_mtest, so move them under the #ifdef Signed-off-by: Tom Rini <trini@ti.com>
2013-03-12CONFIG_BOOTDELAY default should not affect runtimeJoe Hershberger
Because the code that handles bootdelay is compiled in conditionally based on the default value, you are restricted in the default, regardless of what you want the runtime options to be. Change the source to always check if any default is given so that other values can be selected and used at runtime. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-03-12common/main: move set_working_fdt_addr to enable usage of $fdtaddrBarak Wasserstrom
When using $fdtaddr in $bootcmd and $bootcmd is automatically called, $fdtaddr is yet not defined. Signed-off-by: Barak Wasserstrom <wbarak@gmail.com>
2013-03-12env: fix "env ask" commandWolfgang Denk
The "env ask" traditionally uses a somewhat awkward syntax: env ask name [message ...] [size] So far, when a mesage was given, you always also had to enter a size. If you forgot to do that, the command would terminate without any indication of the problem. To avoid incompatible changes of the interface, we now check the last argument if it can be converted into a decimal number. If this is the case, we assume it is a size; otherwise we treat it as part of the message. Also, add a space after the message fore easier reading, and clean up help mesage. Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-03-12cmd_fat.c: Note in fatread help about alignment requirementsTom Rini
When using the partial read feature of fatwrite the buffer we read into can become unaligned not just due to initial location but the size of our partial reads as well. Make this clear in the help text. Signed-off-by: Tom Rini <trini@ti.com>
2013-03-11cmd_df.c: Delete this clearly unused source file.Robert P. J. Day
Nothing appears to use or compile cmd_df.c anymore. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2013-03-11cmd_mtdparts.c: Correct "reseting" to "resetting" in error msgsRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2013-03-11Allow u-boot to be silent without forcing Linux to beJoe Hershberger
That's a bit presumptuous of you, u-boot! Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-03-11cmd_part: don't print cmd name twice in helpStephen Warren
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>
2013-03-11Feature Removal: disable "mtest" command by defaultWolfgang Denk
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>
2013-03-04bootm: fix conditional compilation for bootm ramdisk subcommandDaniel Schwierzeck
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>
2013-03-04env: Avoid clobbering an edited variable on ctrl-cJoe Hershberger
If readline says there was an error, don't write to the variable! Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2013-03-04sandbox: Add 'sb' command to access filesystem featuresSimon Glass
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>
2013-03-04Merge branch 'mem' of git://git.denx.de/u-boot-x86Tom Rini
2013-03-04Merge branch 'master' of git://git.denx.de/u-boot-blackfinTom Rini
2013-03-04blackfin: bf60x: Port blackfin core architecture code to boot on bf60x.Sonic Zhang
Set up clocks, DDR controller, Nor flash controller, reboot, serial port. Add new SPI boot modes. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
2013-03-01SPL: Change description for spl commandStefano Babic
Add a more descriptive text to the help of the spl command. Signed-off-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Tom Rini <trini@ti.com>
2013-03-01hash: Use lower case for hash algorithm namesSimon Glass
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. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01sandbox: Allow hash functions to work correctlySimon Glass
Use map_sysmem() so that hashing is possible on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01sandbox: Update mtest to fix crashesSimon Glass
Use map_sysmem() in the memory tester so that it works as expected on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Move CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of fileSimon Glass
This config effectively has a default value of 0, so add this setting at the top of the code to remove an #ifdef in the C function. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Roll crc32 into hash infrastructureSimon Glass
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). Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01hash: Add a flag to support saving hashes in the environmentSimon Glass
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. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01image: Use crc header file instead of C prototypesSimon Glass
We have an existing header which the crc32 definitions, so use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01common: Use new numeric setenv functionsSimon Glass
Use setenv_ulong(), setenv_hex() and setenv_addr() in common/ Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Update set_working_fdt_addr() to use setenv_addr()Simon Glass
We might as well use this common function instead of repeating the same code. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Reduce casting in mtestSimon Glass
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. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Bring mtest putc() into common codeSimon Glass
If we get a Ctrl-C abort, we always print a newline. Move this repeated code out of the functions and into a single place in the caller. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Fix mtest indentingSimon Glass
Some of the inner loops are not indented correctly. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Use common mtest iteration countingSimon Glass
The iteration code is the same for each version of the memory test, so pull it out into the common function. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Split out the memory tests into separate functionsSimon Glass
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. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01sandbox: Change memory commands to use map_physmemSimon Glass
Sandbox wants to support commands which use memory. The map_sysmen() call provides this feature, so use this in the memory commands. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-03-01Tidy up error checking and fix bug in hash commandSimon Glass
There are two problems: 1. The argument count needs to be checked before argv is used 2. When verify is not enabled, we need to define a constant zero value Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-23common/env_nand.c: calculate crc only when readenv was OKPhil Sutter
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>
2013-02-23env_nand.c: clarify log messages when env reading failsPhil Sutter
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>
2013-02-23nand: fix nand read.option parsingHarvey Chapman
"nand read.part addr off size" would be treated as "nand read.raw addr off 1" It now fails as intended stating "Unknown nand command suffix '.part'" Signed-off-by: Harvey Chapman <hchapman@3gfp.com>
2013-02-22imls: Add support to list images in NAND deviceVipin Kumar
This patch adds support to list images in NAND flash through imls Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
2013-02-20gpt: fix partion size limitPiotr Wilczek
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>
2013-02-20led: The gpio_led.c code expects that LED state is from the enumHolger Hans Peter Freyther
u-boot is not consistent if state should be 0|1 or of the enum, the GPIO driver expects this to be one of the enum values. Update the caller. Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
2013-02-20cmd_elf: Fix broken bootvx commandReinhard Arlt
Fix broken bootvx command. Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
2013-02-19cmd_load.c: Add #endif comments to reduce confusionRobert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>