summaryrefslogtreecommitdiff
path: root/common/spl
Commit message (Collapse)AuthorAgeLines
* 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>