summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-02-17-14/+13
|\
| * common: lcd.c: fix data abort exception when try to access bmp headerPrzemyslaw Marczak2014-02-03-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Changes: - le16_to_cpu() to get_unaligned_le16() - le32_to_cpu() to get_unaligned_le32() when access fields in struct bmp header. This changes avoids data abort exception caused by unaligned data access. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2014-02-17-58/+74
|\ \
| * | cmd_mmc.c: Drop open/close mmc sub-commandsTom Rini2014-02-07-72/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The open and close mmc sub-commands implement a hard-coded set of values specific to the SMDK5250 platform. Remove these commands as what they did can be done instead with a series of mmc dev / bootpart / bootbus commands instead now. Cc: Amar <amarendra.xt@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * | cmd_mmc.c: Add bootbus mmc sub-commandTom Rini2014-02-07-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a bootbus sub-command to the mmc command to allow for setting the boot_bus_width, reset_boot_bus_width and boot_mode fields of BOOT_BUS_WIDTH (EXT_CSD[177]). Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * | cmd_mmc.c: Add 'partconf' command to mmcTom Rini2014-02-07-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a partconf sub-command to the mmc command to allow for setting the boot_ack, boot_partition and partition_access fields of PARTITION_CONFIG (formerly BOOT_CONFIG, EXT_CSD[179]). Part of this requires changing the check for 'part' from an strncmp to a strcmp, like the rest of the sub-commands. Cc: Andy Fleming <afleming@gmail.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * | cmd_mmc.c: Rename 'bootpart' to 'bootpart-resize'Tom Rini2014-02-07-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename 'bootpart' to 'bootpart-resize' to better reflect what this command is for. Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * | cmd_mmc.c: Change 'bootpart' code to match normal coding styleTom Rini2014-02-07-4/+11
| | | | | | | | | | | | | | | | | | Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * | SPL: Add CONFIG_SUPPORT_EMMC_BOOT support to CONFIG_SPL_FRAMEWORKTom Rini2014-02-07-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the switch CONFIG_SUPPORT_EMMC_BOOT today to enable some additional features of the eMMC boot partitions. Add support for being told that we have booted from one of these partitions to the spl framework and implement this on TI OMAP/related. Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* | | arc: bdinfo, image and arc-specific init functions declarations supportAlexey Brodkin2014-02-07-0/+19
|/ / | | | | | | | | | | | | | | | | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Francois Bedard <fbedard@synopsys.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de>
* | cmd_pxe.c add any option for filesystem with sysboot uses generic loadDennis Gilmore2014-02-04-3/+19
| | | | | | | | Signed-off-by: Dennis Gilmore <dennis@ausil.us>
* | Merge branch 'clk' of git://www.denx.de/git/u-boot-microblazeTom Rini2014-02-04-0/+52
|\ \
| * | common: Add new clk commandMichal Simek2014-02-04-0/+52
| |/ | | | | | | | | | | | | | | Command provides just dump subcommand for showing clock frequencies in a soc. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stefano Babic <sbabic@denx.de>
* | pxe: implement fdtdir extlinux.conf tagStephen Warren2014-02-04-6/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | People who write (or scripts that auto-generate) extlinux.conf don't want to know about HW-specific information such as FDT filenames. Create a new extlinux.conf tag "fdtdir" that specifies only the directory where FDT files are located, and defer all knowledge of the filename to U-Boot. The algorithm implemented is: ========== if $fdt_addr_r is set: if "fdt" tag was specified in extlinux.conf: load the FDT from the filename in the tag else if "fdtdir" tag was specified in extlinux.conf: if "fdtfile" is set in the environment: load the FDT from filename in "$fdtfile" else: load the FDT from some automatically generated filename if no FDT file was loaded, and $fdtaddr is set: # This indicates an FDT packaged with firmware use the FDT at $fdtaddr ========== A small part of an example /boot/extlinux.conf might be: ========== LABEL primary LINUX zImage FDTDIR ./ LABEL failsafe LINUX bkp/zImage FDTDIR bkp/ ========== ... with /boot/tegra20-seaboard.dtb or /boot/bkp/tegra20-seaboard.dtb being loaded by the sysboot/pxe code. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* | pxe: support "devicetree" tagStephen Warren2014-02-04-0/+1
|/ | | | | | | | | The specification for extlinux.conf[1] states that "fdt" is an alias for "devicetree". To date, U-Boot only implements "fdt". Rectify that. [1] http://freedesktop.org/wiki/Specifications/BootLoaderSpec/ Signed-off-by: Stephen Warren <swarren@nvidia.com>
* board_r - fixup functions table after relocationAlexey Brodkin2014-01-27-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | This is only required for "PIC" relocation and doesn't apply to modern "PIE" relocation which does data relocation as well as code. "init_sequence_r" is just an array that consists of compile-time adresses of init functions. Since this is basically an array of integers (pointers to "void" to be more precise) it won't be modified during relocation - it will be just copied to new location as it is. As a consequence on execution after relocation "initcall_run_list" will be jumping to pre-relocation addresses. As long as we don't overwrite pre-relocation memory area init calls are executed correctly. But still it is dangerous because after relocation we don't expect initially used memory to stay untouched. Cc: Tom Rini <trini@ti.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Doug Anderson <dianders@chromium.org> Cc: Thomas Langer <thomas.langer@lantiq.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
* spl: common: Support for USB MSD FAT image loadingDan Murphy2014-01-24-8/+76
| | | | | | | | Add SPL support to be able to detect a USB Mass Storage device connected to a USB host. Once a USB Mass storage device is detected the SPL will load the u-boot.img from a FAT partition to target address. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* spl: common: Move FAT funcs to a common fileDan Murphy2014-01-24-62/+103
| | | | | | Move the FAT functions to a common location for reuse. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* fdt_support.c: Correct linux,initrd-start/end settingTom Rini2014-01-20-2/+2
| | | | | | | | | | | The change to add 64bit initrd support broke 32bit initrd support as it always set 64bits worth of data into the properties, even on 32bit systems. The fix is to use addr_cell_len (which already says how much data is in 'tmp') to set the property, rather than always setting 8. Thanks to Stephen Warren for pointing out the fix here. Reported-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini2014-01-20-3/+2
|\
| * env_eeprom - fix bus recovery for "eeprom_bus_read"Alexey Brodkin2014-01-13-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "env_eeprom_bus" is no longer in use (it was introduced in commit 548738b4d43af841ff58c787bce297ac6a8bf7d1 "cmd_eeprom: I2C updates"). As in "eeprom_bus_write" we just reset I2C bus with the one we saved in "old_bus". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Heiko Schocher <hs@denx.de>
* | common, env: optimize boottimeHeiko Schocher2014-01-14-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when creating the hashtable, for each environmentvariable getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called, which costs at this point a lot of time. So call this two getenv() calls only once. Boottime on the ids8313 board without this patch: 2013-12-19 13:38:22,894: NAND: 128 MiB 2013-12-19 13:38:27,659: In: serial (~4.8 sec) Bootime with this patch on the ids8313 board: 2013-12-19 13:40:25,332: NAND: 128 MiB 2013-12-19 13:40:25,546: In: serial (~0.2 sec) Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Wolfgang Denk <wd@denx.de>
* | bootm: Reinstate special case for standalone imagesSimon Glass2014-01-14-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For standalone images, bootm had a special case where the OS boot function was NULL but did actually exist. It was just called manually. This was removed by commit 35fc84fa which checks for the non-existence of this function before the special case is examined. There is no obvious reason why standalone is handled with a special case. Adjust the code so that standalone has a normal OS boot function. We still need a special case for when the function returns, but at least we can avoid the main problem. This is intended to fix the reported: ERROR: booting os 'U-Boot' (17) is not supported but needs testing. Signed-off-by: Simon Glass <sjg@chromium.org>
* | common/image.c: move VxWorks header string out of CONFIG_CMD_ELFmiao.yan@windriver.com2014-01-14-1/+1
| | | | | | | | | | | | | | | | | | Otherwise, when booting VxWorks kernel, the incorrect message will be seen: ARM Unknown OS Kernel Image (uncompressed) Signed-off-by: Miao Yan <miao.yan@windriver.com>
* | command.c: Fix auto-completion for the full commands list caseAndrew Gabbasov2014-01-14-2/+2
| | | | | | | | | | | | | | | | | | Compiling of full list of commands does not advance the counter, so it always results in an empty list. This seems to be (inadvertently?) introduced by commit 6c7c946cadfafdea80eb930e3181085b907a0362. Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2014-01-13-5/+9
|\ \
| * | sandbox: spi: Adjust 'sf test' to work on sandboxSimon Glass2014-01-11-5/+9
| |/ | | | | | | | | | | | | | | Add map_sysmem() calls so that this test works correctly on sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Hung-ying Tyan <tyanh@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* | usb: ums: wait for usb cable connection before enter ums modePrzemyslaw Marczak2014-01-13-0/+24
|/ | | | | | | | Before this change ums mode can not be entered when device was using the same usb port for usb/uart communication. Switching USB cable from UART to USB always causes ums exit. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-01-10-41/+50
|\ | | | | | | | | | | | | | | | | | | Bringing in the MMC tree means that CONFIG_BOUNCE_BUFFER needed to be added to include/configs/exynos5-dt.h now. Conflicts: include/configs/exynos5250-dt.h Signed-off-by: Tom Rini <trini@ti.com>
| * arm64: generic board supportDavid Feng2014-01-09-7/+13
| | | | | | | | Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * arm64: core supportDavid Feng2014-01-09-0/+1
| | | | | | | | | | | | | | Relocation code based on a patch by Scott Wood, which is: Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * cmd_pxe: remove compiling warningsDavid Feng2014-01-09-2/+2
| | | | | | | | Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * fdt_support: 64bit initrd start address supportDavid Feng2014-01-09-32/+34
| | | | | | | | Signed-off-by: David Feng <fenghua@phytium.com.cn>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2014-01-09-0/+23
|\ \
| * | mmc: add setdsr supportMarkus Niebel2014-01-09-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eMMC and the SD-Card specifications describe the optional SET_DSR command. During measurements at our lab we found that some cards implementing this feature having really strong driver strengts per default. This can lead to voltage peaks above the specification of the host on signal edges for data sent from a card to the host. Since availability of a given card type may be shorter than the time a certain hardware will be produced it is useful to have support for this command (Alternative would be changing termination resistors and adapting the driver strength of the host to the used card.) Following proposal for an implementation: - new field that reflects CSD field DSR_IMP in struct mmc - new field for design specific DSR value in struct mmc - board code can set DSR value in mmc struct just after registering an controller - mmc_startup sends the the stored DSR value before selecting a card, if DSR_IMP is set Additionally the mmc command is extended to make is possible to play around with different DSR values. The concept was tested on a i.MX53 based platform using a Micron eMMC card where the default DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this feature for instance on a mx53loco one have to add a call to mmc_set_dsr() in board_mmc_init() after calling fsl_esdhc_initialize() for the eMMC. Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
* | | sandbox: Allow reading/writing of RAM bufferSimon Glass2014-01-08-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to save and restore the RAM contents of sandbox U-Boot either for setting up tests, for later analysys, or for chaining together multiple tests which need to keep the same memory contents. Add a function to provide a memory file for U-Boot. This is read on start-up and written when shutting down. If the file does not exist on start-up, it will be created when shutting down. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | sandbox: Allow the console to work earlierSimon Glass2014-01-08-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With sandbox, errors and problems may be reported before console_init_f() is executed. For example, an argument may not parse correctly or U-Boot may panic(). At present this output is swallowed so there is no indication what is going wrong. Adjust the console to deal with a very early sandbox setup, by detecting that there is no global_data yet, and calling os functions in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | sandbox: Allow return from board_init_f()Simon Glass2014-01-08-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The execution flow becomes easier if we can return from board_init_f() as ARM does. We can control things from start.c instead of having to call back into that file from other places. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | sandbox: block driver using host file/device as backing storeHenrik Nordström2014-01-08-0/+64
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a way to use any host file or device as a block device in U-Boot. This can be used to provide filesystem access within U-Boot to an ext2 image file on the host, for example. The support is plumbed into the filesystem and partition interfaces. We don't want to print a message in the driver every time we find a missing device. Pass the information back to the caller where a message can be printed if desired. Signed-off-by: Henrik Nordström <henrik@henriknordstrom.net> Signed-off-by: Simon Glass <sjg@chromium.org> - Removed change to part.c get_device_and_partition() Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | common/fdt_support.c: avoid unintended return from fdt_fixup_memory_banks()Miao Yan2013-12-16-2/+3
| | | | | | | | | | | | | | | | | | | | fdt_fixup_memory_banks() will add and update /memory node in device tree blob. In the case that /memory node doesn't exist, after adding a new one, this function returns error. The correct behavior should be continuing to update its properties. Signed-off-by: Miao Yan <miao.yan@windriver.com>
* | common/cmd_bootm: extend do_bootm_vxworks to support the new VxWorks boot ↵Miao Yan2013-12-16-12/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface. The next version VxWorks adopts device tree (for PowerPC and ARM) as its hardware description mechanism. For PowerPC, the boot interface conforms to the ePAPR standard, which is: void (*kernel_entry)(ulong fdt_addr, ulong r4 /* 0 */, ulong r5 /* 0 */, ulong r6 /* EPAPR_MAGIC */, ulong r7 /* IMA size */, ulong r8 /* 0 */, ulong r9 /* 0 */) For ARM, the boot interface is: void (*kernel_entry)(void *fdt_addr) Signed-off-by: Miao Yan <miao.yan@windriver.com> [trini: Fix build error when !CONFIG_OF_FDT is set, typo on PowerPC, missing extern ft_fixup_num_cores] Signed-off-by: Tom Rini <trini@ti.com>
* | common/cmd_bootm.c: seperate do_bootm_vxworks related code from CONFIG_CMD_ELF.Miao Yan2013-12-13-3/+12
| | | | | | | | | | | | | | | | | | do_bootm_vxworks now is available under the configuration option CONFIG_BOOTM_VXWORKS, thus aligned with other operating systems that supported by bootm command. The bootvx command still depneds on CONFIG_CMD_ELF. Signed-off-by: Miao Yan <miao.yan@windriver.com>
* | Makefile: delete unnecessary CPPFLAGS settingsMasahiro Yamada2013-12-13-2/+0
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | board_f: explicitly disable console on early bootAlexey Brodkin2013-12-13-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If U-Boot build with DEBUG enabled/defined the first call of "debug" function (that dumps data to any available console) will happen before zeroing of initial "gd" in init call "zero_global_data" in "init_sequence_f". And if stack was not filled with zeros chances are high that "gd->have_console" won't be 0. In its turn it will cause attempt to output things to non-initialized yet serial console. So for safety and predictability we set "gd->have_console = 0". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* | Correct vxWorks elf boot to load at correct addressStany MARCEL2013-12-13-3/+3
| | | | | | | | | | | | | | argv[0] contains bootvx (command name) not the load address, if called with argv < 2 use load_addr, else use address argument given to the command. Signed-off-by: Stany MARCEL <smarcel@novasys-ingenierie.com>
* | netbsd:fix documentation typo.Kees Jongenburger2013-12-13-4/+4
|/ | | | | | | The documentation suggested the arguments where passed over r3-r6 while the code below simply does that over r0-r3. Cc: Kumar Gala <galak@kernel.crashing.org>
* cmd_eeprom: bug fix for i2c read/writeKuo-Jung Su2013-12-05-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The local pointer of address (i.e., addr) only gets referenced under SPI mode, and it won't be appropriate to pass only 1-byte addr[1] to i2c_read/i2c_write while CONFIG_SYS_I2C_EEPROM_ADDR_LEN > 1. 1. In U-boot's I2C model, the address would be re-assembled to a byte string in MSB order inside I2C controller drivers. 2. The 'CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW' option which could be found at soft_i2c.c is always turned on in cmd_eeprom.c, the addr[0] always contains the device address with overflowed MSB address bits. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> cc: Peter Tyser <ptyser@xes-inc.com> Cc: Heiko Schocher <hs@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Mischa Jonker <mjonker@synopsys.com>
* Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2013-11-25-18/+61
|\
| * net: add support for extended registers to mdio commandStefano Babic2013-11-22-16/+59
| | | | | | | | | | | | | | | | Some phys (Micrel) have additional registers that can be accessed using a special sequence. This patch allows to use standard "mdio" command to accesss these registers. Signed-off-by: Stefano Babic <sbabic@denx.de>
| * net: trivial: Fix typos in mii field descriptionsStephan Bauroth2013-11-22-2/+2
| | | | | | | | | | Signed-off-by: Stephan Bauroth <stephan.bauroth@iav.de> Patch: 265707