summaryrefslogtreecommitdiff
path: root/common/spl
Commit message (Collapse)AuthorAgeLines
* common: convert makefiles to Kbuild styleMasahiro Yamada2013-10-31-29/+7
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* spl_mmc: only call printf or puts with CONFIG_SPL_LIBCOMMON_SUPPORTPaul Burton2013-09-17-0/+16
| | | | | | | If we don't have CONFIG_SPL_LIBCOMMON_SUPPORT defined then stdio functions are unavailable & calling them will cause a link failure. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* spl: remove unnecessary (& ARM specific) include of asm/utils.hPaul Burton2013-09-17-1/+0
| | | | | | | ARM is the only architecture which includes this header and nothing in spl_mmc.c makes use of it. Remove the include. Signed-off-by: Paul Burton <paul.burton@imgtec.com>
* Merge branch 'master' of git://88.191.163.10/u-boot-armTom Rini2013-08-18-0/+4
|\ | | | | | | | | | | | | | | | | | | Fixup an easy conflict over adding the clk_get prototype and USB_OTG defines for am33xx having moved. Conflicts: arch/arm/include/asm/arch-am33xx/hardware.h Signed-off-by: Tom Rini <trini@ti.com>
| * spl_mmc.c: Detect missing kernel image in RAW MMCTom Rini2013-07-26-0/+4
| | | | | | | | | | | | | | | | | | Currently, we assume that if we can read from MMC correctly, we have found a valid image. This is not the case as an empty area will read just fine. Add a check for a valid IH_MAGIC. Signed-off-by: Tom Rini <trini@ti.com> Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
* | SPL: Limit image name print lengthTaras Kondratiuk2013-08-16-2/+3
|/ | | | | | | | | If image name is longer than 32 bytes, then it will be truncated. This will remove '\0' at the end of the line, so printf will go out of string limit. Signed-off-by: Taras Kondratiuk <taras@ti.com> Reviewed-by: Tom Rini <trini@ti.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-115/+8
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* 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 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-30-0/+138
|\ | | | | | | | | | | Conflicts: common/cmd_fpga.c drivers/usb/host/ohci-at91.c
| * drivers/mmc: move spl_mmc.c to common/splYing Zhang2013-05-15-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mpc85xx repuires a special layout on the memory device that is connected to the eSDHC controller interface. But the file spl_mmc.c didn't handle this specfic case, there needs a special treatmen, in the powerpc drictory. So, there is no longer to keep spl_mmc.c on mpc85xx, CONFIG_SPL_FRAMEWORK is not set. When CONFIG_SPL_MMC_SUPPORT is set and CONFIG_SPL_FRAMEWORK is not set, there was an error in drivers/mmc/spl_mmc.c: drivers/mmc/libmmc.o:(.got2+0x8): undefined reference to `spl_image'. Now, the solution is to move the file "spl_mmc.c" to directory "common/spl". Signed-off-by: Ying Zhang <b40530@freescale.com>
* | Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-11-7/+3
|\ \ | |/ |/|
| * ARM: OMAP: Cleanup boot parameters usageSRICHARAN R2013-05-10-7/+3
| | | | | | | | | | | | | | | | | | | | | | The boot parameters are read from individual variables assigned for each of them. This been corrected and now they are stored as a part of the global data 'gd' structure. So read them from 'gd' instead. Signed-off-by: Sricharan R <r.sricharan@ti.com> [trini: Add igep0033 hunk] Signed-off-by: Tom Rini <trini@ti.com>
* | lib: consolidate hang()Andreas Bießmann2013-05-01-7/+0
|/ | | | | | | | | Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini <trini@ti.com>
* SPL: ONENAND: Support SPL to boot u-boot from OneNAND.Enric Balletbo i Serra2013-03-11-0/+53
| | | | | | | | | | This patch will allow use SPL to boot an u-boot from the OneNAND. Tested with IGEPv2 board with a OneNAND from Numonyx Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> [trini: Add <spl.h> hunk to fix warning] Signed-off-by: Tom Rini <trini@ti.com>
* spl: support for booting via usbethIlya Yanok2013-02-18-0/+5
| | | | | | | | | In case of usbeth booting just call net_load_image("usb_ether"). This patch also adds CONFIG_SPL_USBETH_SUPPORT and CONFIG_SPL_MUSB_NEW_SUPPORT config options to enable linking of SPL against USB gagdet support and new MUSB driver resp. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* SPL: Port SPL framework to powerpcStefan Roese2012-12-05-0/+16
| | | | | | | | | | | | | This patch enables the SPL framework to be used on powerpc platforms and not only ARM. timer_init() does not exist on PPC systems. The timer (decrementer) is initialized and enabled in interrupt_init() here. And currently interrupt_init() is called after relocation to SDRAM. Since the only powerpc SPL implementation (a3m071) doesn't need a timer, let's remove this timer_init() call for PPC systems. Signed-off-by: Stefan Roese <sr@denx.de>
* SPL: make jump_to_image_no_args a weak symbolAllen Martin2012-10-29-4/+4
| | | | | | | | | | | | | | Change jump_to_image_no_args() to a weak symbol to allow override by SoC specific code. This is required by tegra because the SPL runs on a different CPU from the image it is loading, so tegra specific initialization is required to start the host CPU. Pass in spl_image as a parameter for the same reason. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* SPL: Remove setting GD_FLG_RELOC in preloader_console_init()Tom Rini2012-10-15-1/+0
| | | | | | | We have not strictly speaking relocated at this point, do not claim that we have. This is not required for output. Signed-off-by: Tom Rini <trini@ti.com>
* OMAP: networking support for SPLIlya Yanok2012-10-01-0/+62
| | | | | | | | | | | | | | This patch adds support for networking in SPL. Some devices are capable of loading SPL via network so it makes sense to load the main U-Boot binary via network too. This patch tries to use existing network code as much as possible. Unfortunately, it depends on environment which in turn depends on other code so SPL size is increased significantly. No effort was done to decouple network code and environment so far. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@ti.com>
* OMAP: spl: call timer_init() from SPLIlya Yanok2012-10-01-0/+2
| | | | | | | We need to initialize timer properly, otherwise all delays inside SPL will be wrong. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* SPL: Add support for loading image from ram in SPL.Pavel Machek2012-09-27-0/+22
| | | | | Signed-off-by: Pavel Machek <pavel@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Rework how we inform about un-headered imagesTom Rini2012-09-27-5/+2
| | | | | | | | | | | | First, remove the puts from the case where we don't have an mkimage header as this is somewhat common and intentional for no-arg target images. Second, rework the final switch statement in board_init_r to, in the case of !CONFIG_SPL_OS_BOOT be only about doing debug prints about if we know what the magic is or not (the CONFIG_SPL_OS_BOOT case is unchanged). Then we call jump_to_image_no_args(). This gives us the same behavior as before but with slightly smaller code. Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Make un-supported boot device puts a debug insteadTom Rini2012-09-27-3/+1
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Enable use of custom defined U-Boot entry pointStefan Roese2012-09-27-1/+4
| | | | | | | | | By setting CONFIG_SYS_UBOOT_START boards can now use a different entry point for their U-Boot image. So the U-Boot entry point is not fixed to CONFIG_SYS_TEXT_BASE any more. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: SPI: Enhance spi_spl_load to match the other load functionsTom Rini2012-09-27-2/+2
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Add option to skip copying of the mkimage headerStefan Roese2012-09-27-4/+17
| | | | | | | | | | | | | | | On some system (e.g. powerpc), the load-address and entry-point is located at address 0. So the current approach to load the image (payload) including the header to the address "load-address - 64" can't work here. This patch adds an flag to skip this copying including header to the SPL framework. By setting SPL_COPY_PAYLOAD_ONLY, only the playload will be copied. This will be used by the SPL NOR flash driver on powerpc. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Add NOR flash booting supportStefan Roese2012-09-27-0/+68
| | | | | | | | | | | | | SPL NOR flash booting support is quite simple. Only copying of the images is needed. On MPC5xxx we need to make sure to only use the standard memcpy() implementation and not the MPC5xxx specific one. As the MPC5xxx version has some complexity which is not needed for this SPL booting. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: NAND: Move arch/arm/cpu/armv7/omap-common/spl_nand.c to common/splTom Rini2012-09-27-0/+101
| | | | | | | We move the spl_nand_load_image function to common/spl. This will allow for easier integration of SPL-boots-Linux code on other arches. Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Use image_get_xxx() functions to access header valuesStefan Roese2012-09-27-5/+5
| | | | | Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: do not use fix value for u-boot sizeStefano Babic2012-09-27-1/+5
| | | | | | | | | | If an u-boot image is not found, SPL thinks to load a bare u-boot.bin image with a maximum size of 200KB. Use CONFIG_SYS_MONITOR_LEN instead. Signed-off-by: Stefan Roese <stefan.roese@gmail.com> Signed-off-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Create arch/arm/lib/spl.c for board_init_f and jump_to_image_linuxTom Rini2012-09-27-35/+6
| | | | | | | | | | | | | | In SPL (CONFIG_SPL_FRAMEWORK) board_init_f must setup the stack pointer, clear the BSS and call board_init_r. We mark this as weak as some platforms may need to perform additional initalization at this point. We provide a gd that we know will be in a usable location, once the BSS has been cleared to help with this as well. Finally, we no longer call relocate_code so remove that from the armv7 version. Next, both board_init_f and jump_to_image_linux are going to be inherently arch-specific, so move these versions to arch/arm/lib/spl.c Signed-off-by: Tom Rini <trini@ti.com>
* SPL: Move the omap SPL framework to common/splTom Rini2012-09-27-0/+336
Add a new flag, CONFIG_SPL_FRAMEWORK to opt into the common/spl SPL framework, enable on all of the previously using boards. We move the spl_ymodem.c portion to common/ and spl_mmc.c to drivers/mmc/. We leave the NAND one in-place as we plan to replace it later in this series. We use common/spl to avoid linker problems with respect to merging constant strings in objects. Otherwise all strings in common/ will be linked in and kept which grows SPL in size too much. Signed-off-by: Tom Rini <trini@ti.com>