summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mpc5200: Add a4m2k board portStefan Roese2013-03-096-55/+188
| | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Stefan Roese <sr@denx.de>
* mpc5200: spl_boot.c: Change init oder to first enable printfStefan Roese2013-03-091-6/+14
| | | | | | | | | | 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. Signed-off-by: Stefan Roese <sr@denx.de>
* x86: Enable CONFIG_OF_CONTROL on corebootSimon Glass2013-03-041-0/+6
| | | | | | | Make use of a device tree on coreboot boards, and set the default to link. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Adjust link device tree include fileSimon Glass2013-03-041-1/+1
| | | | | | | | 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. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add error checking to x86 relocation codeSimon Glass2013-03-041-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 whih is beyond the end of bss: 0117b484 g .bss 00000000 __bss_end Somehow the __bss_end here is 255 bytes ahead. 2. do_elf_reloc_fixups(): uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start; Here the __text_start is 0 in the file: 1111d9f: bb a0 e0 13 01 mov $0x113e0a0,%ebx 1111da4: 81 ef 00 00 00 00 sub $0x0,%edi As it happens, both of these are in pre-relocation code. For these reasons we silent check and ignore bad relocations. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Support relocation of FDT on start-upSimon Glass2013-03-047-2/+46
| | | | | | | With CONFIG_OF_CONTROL we may have an FDT in the BSS region. Relocate it up with the rest of U-Boot to keep the rest of memory free. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Rearrange the output input to remove BSSSimon Glass2013-03-041-7/+12
| | | | | | | At present BSS data is including in the image, which wastes binary space. Remove it by rearranging the sections so that BSS is last. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add an __end symbol to signal the end of the U-Boot binarySimon Glass2013-03-043-1/+4
| | | | | | | With this symbol we can easy append something (e.g. an FDT) to the U-Boot binary and access it from within U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Permit bootstage and timer data to be used prior to relocationSimon Glass2013-03-044-18/+16
| | | | | | | | | It is useful to be able to access the timer before U-Boot has relocated so that we can fully support bootstage. Add new global_data members to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add basic cache operationsSimon Glass2013-03-041-0/+23
| | | | | | | At present most x86 cache operations are undefined. Add a basic implementation for these. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add function to get top of usable ramSimon Glass2013-03-042-24/+22
| | | | | | | | | | | | | 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. Signed-off-by: Simon Glass <sjg@chromium.org>
* Prepare v2013.04-rc1Tom Rini2013-03-041-2/+2
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* kerneldoc: Add Sonic Zhang to alias bfin in git-mailrc.Sonic Zhang2013-03-041-1/+2
| | | | Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
* bootm: fix conditional compilation for bootm ramdisk subcommandDaniel Schwierzeck2013-03-041-1/+1
| | | | | | | | | 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>
* env: Avoid clobbering an edited variable on ctrl-cJoe Hershberger2013-03-041-1/+2
| | | | | | If readline says there was an error, don't write to the variable! Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* ubifs: Allow ubifsmount volume reference by numberJoe Hershberger2013-03-0410-14/+13
| | | | | | | | | | | | | | | | | | 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>
* sandbox: config: Enable sandbox commandSimon Glass2013-03-041-0/+2
| | | | | | | | The 'sb' command allows loading files from the host, and listing directories. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* sandbox: Enable ext4 and fat filesystemsSimon Glass2013-03-041-0/+7
| | | | | | | These are useful for build-testing code, at least. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* sandbox: Add 'sb' command to access filesystem featuresSimon Glass2013-03-044-0/+66
| | | | | | | | | 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>
* sandbox: Add host filesystemSimon Glass2013-03-047-0/+189
| | | | | | | This allows reading of files from the host filesystem in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* sandbox: Add a way of obtaining directory listingsSimon Glass2013-03-042-0/+149
| | | | | | | | This implementation uses opendir()/readdir() to access the directory information and then puts it in a linked list for the caller's use. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* fs: Move ls and read methods into ext4, fatSimon Glass2013-03-045-110/+67
| | | | | | | | | 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>
* fs: Use map_sysmem() on readSimon Glass2013-03-041-8/+15
| | | | | | | | This allows us to use filesystems on sandbox. It has no effect on other architectures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* fs: Tell probe functions where to put their resultsSimon Glass2013-03-041-8/+12
| | | | | | | | | | 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>
* fs: Use filesystem methods instead of switch()Simon Glass2013-03-041-34/+26
| | | | | | | | | | 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>
* fs: Fully populate the filesystem method structSimon Glass2013-03-041-9/+47
| | | | | | | | | 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>
* ext4: Split write support into its own fileSimon Glass2013-03-043-964/+997
| | | | | | | This code seems to be entirely othogonal, so remove the #ifdef and put the condition in the Makefile instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'mem' of git://git.denx.de/u-boot-x86Tom Rini2013-03-0438-583/+761
|\
| * hash: Use lower case for hash algorithm namesSimon Glass2013-02-283-6/+11
| | | | | | | | | | | | | | | | | | | | 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>
| * sandbox: Allow hash functions to work correctlySimon Glass2013-02-281-8/+16
| | | | | | | | | | | | Use map_sysmem() so that hashing is possible on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Update mtest to fix crashesSimon Glass2013-02-281-45/+63
| | | | | | | | | | | | | | Use map_sysmem() in the memory tester so that it works as expected on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Move CONFIG_SYS_MEMTEST_SCRATCH #ifdef to top of fileSimon Glass2013-02-281-4/+4
| | | | | | | | | | | | | | 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>
| * sandbox: config: Enable hash functions and mtestSimon Glass2013-02-281-2/+7
| | | | | | | | | | | | | | | | 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). Signed-off-by: Simon Glass <sjg@chromium.org>
| * Roll crc32 into hash infrastructureSimon Glass2013-02-285-107/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * hash: Add a flag to support saving hashes in the environmentSimon Glass2013-02-284-26/+66
| | | | | | | | | | | | | | | | | | 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>
| * image: Use crc header file instead of C prototypesSimon Glass2013-02-281-2/+2
| | | | | | | | | | | | We have an existing header which the crc32 definitions, so use it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * net: Use new numeric setenv functionsSimon Glass2013-02-282-9/+3
| | | | | | | | | | | | Use setenv_ulong(), setenv_hex() and setenv_addr() in net/ Signed-off-by: Simon Glass <sjg@chromium.org>
| * fs: Use new numeric setenv functionsSimon Glass2013-02-282-6/+2
| | | | | | | | | | | | Use setenv_ulong(), setenv_hex() and setenv_addr() in fs/ Signed-off-by: Simon Glass <sjg@chromium.org>
| * common: Use new numeric setenv functionsSimon Glass2013-02-2815-71/+48
| | | | | | | | | | | | Use setenv_ulong(), setenv_hex() and setenv_addr() in common/ Signed-off-by: Simon Glass <sjg@chromium.org>
| * Update set_working_fdt_addr() to use setenv_addr()Simon Glass2013-02-283-14/+19
| | | | | | | | | | | | | | We might as well use this common function instead of repeating the same code. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Reduce casting in mtestSimon Glass2013-02-281-12/+18
| | | | | | | | | | | | | | | | 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>
| * Bring mtest putc() into common codeSimon Glass2013-02-281-23/+9
| | | | | | | | | | | | | | 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>
| * Fix mtest indentingSimon Glass2013-02-281-161/+161
| | | | | | | | | | | | Some of the inner loops are not indented correctly. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Use common mtest iteration countingSimon Glass2013-02-281-64/+59
| | | | | | | | | | | | | | 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>
| * Split out the memory tests into separate functionsSimon Glass2013-02-281-101/+116
| | | | | | | | | | | | | | | | 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>
| * sandbox: Change memory commands to use map_physmemSimon Glass2013-02-281-43/+79
| | | | | | | | | | | | | | 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>
| * sandbox: Add un/map_sysmen() to deal with sandbox's ram_bufSimon Glass2013-02-284-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Improve sandbox serial port keyboard interfaceTaylor Hutt2013-02-283-6/+56
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Update print_buffer() to use constSimon Glass2013-02-282-2/+4
| | | | | | | | | | | | | | | | 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. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Tidy up error checking and fix bug in hash commandSimon Glass2013-02-281-0/+4
| | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud