summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
...
* | bootstage: Correct printf typesSimon Glass2013-06-26-2/+2
| | | | | | | | | | | | | | The unstash code is a bit loose with its printf() types, which gives warnings on sandbox. Correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Fix missing return in do_mem_loop()Simon Glass2013-06-26-0/+2
| | | | | | | | | | | | | | For some reason this does not normally cause a compiler warning, but the code seems to be incorrect. Add the missing return. Signed-off-by: Simon Glass <sjg@chromium.org>
* | pxe: add ipappend supportRob Herring2013-06-24-3/+44
| | | | | | | | | | | | Add ipappend support to pass network device information to the kernel. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | net: Fix build regression in cmd_pxe.cJoe Hershberger2013-06-24-0/+2
| | | | | | | | | | | | | | | | Not all boards define an SOC. As a result, we can't depend on that. This was introduced in 39f985536d3f0df5dba32c15b64ba2b5d32dd296 Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | pxe: add support for per arch and SoC default pathsRob Herring2013-06-24-6/+20
| | | | | | | | | | | | | | | | | | A pxelinux server setup for "default" menu is typically an x86 binary. This does not work well with a mixed architecture setup. Extend the default search to look for default-<arch>-<soc> and then default-<arch> before falling back to just "default". Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: add support for ontimeout tokenRob Herring2013-06-24-5/+6
| | | | | | | | | | | | | | | | | | ontimeout is similar to default, but is the selection on menu timeout. This is how cobbler sets a default. The label default is supposed to be the default selection when <enter> is pressed. If both default and ontimeout are set, last one parsed wins. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: simplify menu display and selectionRob Herring2013-06-24-18/+16
| | | | | | | | | | | | | | | | Menus with lots of entries and long append lines are hard to read. Just show a numbered list using the label or name and make the choice by entering the number. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: always display a menu when presentRob Herring2013-06-24-1/+2
| | | | | | | | | | | | | | | | | | The prompt flag is for displaying a "boot:" prompt in pxelinux. This doesn't make sense for u-boot as we don't support the pxelinux command interface. So we should just ignore prompt statements and always show the menu if a menu is present. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: try bootz if bootm fails to find a valid imageRob Herring2013-06-24-1/+10
| | | | | | | | | | | | | | Standard pxelinux servers will typically use a zImage rather than u-boot image format, so fallback to bootz if bootm fails. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | bootz: un-staticize do_bootzRob Herring2013-06-24-1/+1
| | | | | | | | | | | | Make do_bootz available for other functions like do_bootm is. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: fix handling of different localboot valuesRob Herring2013-06-24-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for value of -1 For localboot. A value of -1 means return to u-boot prompt. The localboot value is often 0, so we need to distinguish the value from localboot being selected. A value of greater than or equal to 0 means attempt local boot command. If localboot is selected, we don't want to try other entries. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: make string parameters constRob Herring2013-06-24-12/+12
| | | | | | | | | | | | Convert a bunch of string parameters to be const. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | pxe: Use ethact setting for pxeRob Herring2013-06-24-25/+9
| | | | | | | | | | | | | | | | Get the MAC address using eth_getenv_enetaddr_by_index so that the MAC address of ethact is used. This enables using the a NIC other than the first one for PXE boot. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-06-22-2/+107
|\ \
| * \ Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-06-19-2/+107
| |\ \ | | | | | | | | | | | | | | | | Conflicts: spl/Makefile
| | * | COMMON: MMC: Command to support EMMC booting and to resize EMMC boot partitionAmar2013-06-13-2/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds commands to access(open/close) and resize boot partitions on EMMC. Signed-off-by: Amar <amarendra.xt@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | | | Makefile: move the common makefile line to public areaYing Zhang2013-06-20-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the common makefile line shared by the SPL and non-SPL to the public area, so that we can avoid excessive SPL symbols. Some of them will be used by the SPL later. This patch is on top of the patch "common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL". Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* | | | common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPLYing Zhang2013-06-20-10/+17
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There will need the environment in SPL for reasons other than network support (in particular, hwconfig contains info for how to set up DDR). Add a new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT for environment in common/Makefile. Signed-off-by: Ying Zhang <b40530@freescale.com> Reviewed-by: Tom Rini <trini@ti.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* | | image: Use ENOENT instead of ENOMEDIUM for better compatibilitySimon Glass2013-06-17-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This error may not be defined on some platforms such as MacOS so host compilation will fail. Use one of the more common errors instead. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Andreas Bießmann <andreas.devel@googlemail.com> Tested-by: Lubomir Popov <lpopov@mm-sol.com>
* | | Merge branch 'master' of git://www.denx.de/git/u-boot-mmcTom Rini2013-06-14-2/+10
|\ \ \
| * | | env_mmc: allow negative CONFIG_ENV_OFFSETStephen Warren2013-06-13-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A negative value of CONFIG_ENV_OFFSET is treated as a backwards offset from the end of the eMMC device/partition, rather than a forwards offset from the start. This is useful when a single board may be stuffed with different eMMC devices, each of which has a different capacity, and you always want the environment to be stored at the very end of the device (or eMMC boot partition for example). One example of this case is NVIDIA's Ventana reference board. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2013-06-13-16/+18
|\ \ \ \
| * | | | cmd_sf: Add print mesgs on sf read/write commandsJagannadha Sutradharudu Teki2013-06-03-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a print messages while using 'sf read' and 'sf write' commands to make sure that how many bytes read/written from/into flash device. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Tom Rini <trini@ti.com>
| * | | | cmd_sf: Add print mesg for 'sf erase' commandJagannadha Sutradharudu Teki2013-06-03-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a print messages while using 'sf erase' command to make sure that how many bytes erased in flash device. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Tom Rini <trini@ti.com>
* | | | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2013-06-12-5/+20
|\ \ \ \ \ | |_|/ / / |/| | | |
| * | | | usb: ehci: add Faraday USB 2.0 EHCI supportKuo-Jung Su2013-06-12-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support to both Faraday FUSBH200 and FOTG210, the differences between Faraday EHCI and standard EHCI are listed bellow: 1. The PORTSC starts at 0x30 instead of 0x44. 2. The CONFIGFLAG(0x40) is not only un-implemented, and also has its address space removed. 3. Faraday EHCI is a TDI design, but it doesn't compatible with the general TDI implementation found at both U-Boot and Linux. 4. The ISOC descriptors differ from standard EHCI in several ways. But since U-boot doesn't support ISOC, we don't have to worry about that. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
| * | | | usb: hub: make minimum power-on delay configurableKuo-Jung Su2013-06-12-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the minimum power-on delay for USB HUB become configurable. The original design waits at least 100 msec here, but some EHCI controlers(e.g. Faraday EHCI) are known to require much longer delay interval. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
| * | | | usb: workaround non-working keyboards.Vincent Palatin2013-06-12-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the USB keyboard is not answering properly the first request on its interrupt endpoint, just skip it and try the next one. This workarounds an issue with a wireless mouse dongle which presents itself both as a keyboard and a mouse but has a non-functional keyboard interface. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit 012bbf0ce0301be2482857e3f03b481dd15c2340) Rebased to upstream/master: Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
| * | | | usb: properly re-initialize the USB keyboard.Vincent Palatin2013-06-12-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow to reconfigure properly the USB keyboard driver when we enumerate several times the USB devices and its position in the device tree has changes. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
* | | | | powerpc: fix 8xx and 82xx type-punning warnings with GCC 4.7Scott Wood2013-06-11-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C99's strict aliasing rules are insane to use in low-level code such as a bootloader, but as Wolfgang has rejected -fno-strict-aliasing in the past, add a union so that 16-bit accesses can be performed. Compile-tested only. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Wolfgang Denk <wd@denx.de>
* | | | fdt: remove unaligned access in fdt_fixup_ethernet()Stephen Warren2013-06-07-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some ARM compilers may emit code that makes unaligned accesses when faced with constructs such as: char mac[16] = "ethaddr"; Replace this with a strcpy() call instead to avoid this. strcpy() is used here, rather than replacing all usage of the mac variable with the string itself, since the loop itself sprintf()s to the variable each iteration, so strcpy() is doing basically the same thing. Reported-by: Florian Meier Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
* | | | generic_board: reduce the redundancy of gd_t struct membersMasahiro Yamada2013-06-07-55/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit refactors common/board_f.c and common/board_r.c in order to delete the dest_addr and dest_addr_sp from gd_t struct. As mentioned as follows in include/asm-generic/global_data.h, /* TODO: is this the same as relocaddr, or something else? */ unsigned long dest_addr; /* Post-relocation address of U-Boot */ dest_addr is the same as relocaddr. Likewise, dest_addr_sp is the same as start_addr_sp. It seemed dest_addr/dest_addr_sp was used only as a scratch variable to calculate relocaddr/start_addr_sp, respectively. With a little refactoring, we can delete dest_addr and dest_addr_sp. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org>
* | | | spl_mmc: add Falcon mode support for raw variantPeter Korsgaard2013-06-07-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Falcon mode support is enabled (and the system isn't directed into booting u-boot), it will instead try to load kernel from sector CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR and CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS of kernel argument parameters starting from sector CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* | | | spl_mmc: mmc_load_image_raw(): Add sector argumentPeter Korsgaard2013-06-07-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | So we can use it for falcon mode as well. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* | | | spl_mmc: add Falcon mode support for FAT variantPeter Korsgaard2013-06-07-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Falcon mode support is enabled (and the system isn't directed into booting u-boot), it will instead try to load kernel from CONFIG_SPL_FAT_LOAD_KERNEL_NAME file and kernel argument parameters from CONFIG_SPL_FAT_LOAD_ARGS_NAME, both from the same partition as u-boot. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* | | | spl_mmc: mmc_load_image_fat(): Add filename argument and move fat init outPeter Korsgaard2013-06-07-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | So we can use it for falcon mode as well. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* | | | spl_mmc: return error from mmc_load_image_{raw, fat} rather than hangingPeter Korsgaard2013-06-07-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | So we can instead fallback to doing something else on errors. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2013-06-07-0/+87
|\ \ \ \
| * | | | lcd: add functions to set up simplefb device treeStephen Warren2013-06-05-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simple-framebuffer is a new device tree binding that describes a pre- configured frame-buffer memory region and its format. The Linux kernel contains a driver that supports this binding. Implement functions to create a DT node (or fill in an existing node) with parameters that describe the framebuffer format that U-Boot is using. This will be immediately used by the Raspberry Pi board in U-Boot, and likely will be used by the Samsung ARM ChromeBook support soon too. It could well be used by many other boards (e.g. Tegra boards with built-in LCD panels, which aren't yet supported by the Linux kernel). Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Simon Glass <sjg@chromium.org>
* | | | | fdt: allow bootdelay to be specified via device treeStephen Warren2013-06-04-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be useful to force bootcmd to execute as soon as U-Boot has started. My use-case is: An SoC-specific tool pushes U-Boot into RAM, along with an image to be written to device boot flash, with the DT config property "bootcmd" set to contain a command to write that image to flash. In this scenario, we don't want to allow any stale bootdelay value taken from the current flash content to affect how long it takes before the flashing process starts. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* | | | | common: board_f: Do not call board_postclk_init twiceMasahiro Yamada2013-06-04-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic-board board_init_f function called board_postclk_init twice. The first one came from arch/arm/lib/board.c, while the second one from arch/powerpc/lib/board.c. This commit deletes the first occurrence. In addition, the second get_clocks call is moved after board_postclk_init in order to keep the function call order both for ARM and PowerPC. ARM board calles get_clocks function after board_postclk_init. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | | | sandbox: image: Adjust FIT image printing to work with sandboxSimon Glass2013-06-04-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use map_sysmem() to convert from address to pointer, so that sandbox can print FIT information without crashing. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | | | image: Use fit_image_load() to load kernelSimon Glass2013-06-04-152/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new common code to load a kernel. The functionality should not change. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | | | sandbox: Adjust bootm command to work with sandboxSimon Glass2013-06-04-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use map_sysmem() when converting from addresses to pointers, so that bootm can be used with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | | | image: Use fit_image_load() to load FDTSimon Glass2013-06-04-199/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new common code to load a flat device tree. Also fix up a few casts so that this code works with sandbox. Other than that the functionality should not change. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | | | image: Use fit_image_load() to load ramdiskSimon Glass2013-06-04-168/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new common code to load a ramdisk. The functionality should not change. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | | | image: Introduce fit_image_load() to load images from FITsSimon Glass2013-06-04-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present code to load an image from a FIT is duplicated in the three places where it is needed (kernel, fdt, ramdisk). The differences between these different code copies is fairly minor. Create a new function in the fit code which can handle any of the requirements of those cases. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | | | main: Add debug_bootkeys to avoid #ifdefsSimon Glass2013-06-04-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define a simple debug condition at the top of the file, to avoid using lots of #ifdefs later on. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | | main: Add debug_parser() to avoid #ifdefsSimon Glass2013-06-04-35/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define a simple debug condition at the top of the file, to avoid using lots of #ifdefs later on. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | | main: Correct header orderSimon Glass2013-06-04-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The headers are a bit out of order, so fix them. Signed-off-by: Simon Glass <sjg@chromium.org>