summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv7/omap-common/spl.c
Commit message (Collapse)AuthorAgeFilesLines
* SPL: Move the omap SPL framework to common/splTom Rini2012-09-271-225/+0
| | | | | | | | | | | | | 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>
* ARM: SPL: Start hooking in the current SPI SPL supportTom Rini2012-09-271-0/+5
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* ARM: SPL: Clean up spl.c / spl_nand.c slightlyTom Rini2012-09-271-15/+8
| | | | | | | | | | | | | - Remove includes we don't need - Switch some printf statements to puts - Convert some printf statements to debug, introduce new puts statements - In most cases saying just "No mkimage signature, assuming u-boot.bin" or similar is sufficient. This also means the non-DEBUG case doesn't need printf, in the core of SPL. - The other case here is that PLAIN_VERSION provided what we wanted already, so just use it. Signed-off-by: Tom Rini <trini@ti.com>
* ARM: SPL: Add <asm/spl.h> and <asm/arch/spl.h>Tom Rini2012-09-271-1/+1
| | | | | | | Move the SPL prototypes from <asm/omap_common.h> into <asm/spl.h> and add <asm/arch/spl.h> for arch specific portions of CONFIG_SPL_FRAMEWORK. Signed-off-by: Tom Rini <trini@ti.com>
* ARM: SPL: Only call mem_malloc_init if configuredTom Rini2012-09-271-0/+2
| | | | | | | | We can only attempt to setup a malloc pool if CONFIG_SYS_SPL_MALLOC_START is defined, and not all boards require it. Make the call depend on the define. Signed-off-by: Tom Rini <trini@ti.com>
* ARM: SPL: Rename omap_boot_device to spl_boot_deviceTom Rini2012-09-271-1/+1
| | | | Signed-off-by: Tom Rini <trini@ti.com>
* omap-common: SPL: Add CONFIG_SPL_DISPLAY_PRINT / spl_display_print()Tom Rini2012-09-271-6/+3
| | | | | | | | Only omap4/5 currently have a meaningful set of display text and overo had been adding a function to display nothing. Change how this works to be opt-in and only turned on for omap4/5 now. Signed-off-by: Tom Rini <trini@ti.com>
* arm: omap5: correct boot device mode7 for eMMCBalaji T K2012-05-151-0/+1
| | | | | | | In OMAP5 Boot device mode of 6 and 7 should be mapped to mmc2/eMMC Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
* SPL: call cleanup_before_linux() before booting LinuxStefano Babic2012-03-271-1/+1
| | | | | | | Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Tom Rini <tom.rini@gmail.com> CC: Wolfgang Denk <wd@denx.de> CC: Simon Schwarz <simonschwarzcor@gmail.com>
* omap/spl: change output of spl_parse_image_headerSimon Schwarz2012-03-271-1/+1
| | | | | | | | | This only outputs "Assuming u-boot.bin..." if debug is active. Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> CC: Tom Rini <tom.rini@gmail.com> CC: Stefano Babic <sbabic@denx.de> CC: Wolfgang Denk <wd@denx.de>
* omap-common/spl: Add linux boot to SPLSimon Schwarz2012-03-271-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | This adds Linux booting to the SPL This depends on CONFIG_MACH_TYPE patch by Igor Grinberg (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105809) Related CONFIGs: CONFIG_SPL_OS_BOOT Activates/Deactivates the OS booting feature CONFIG_SPL_OS_BOOT_KEY defines the IO-pin number u-boot switch - if pressed u-boot is booted CONFIG_SYS_NAND_SPL_KERNEL_OFFS Offset in NAND of direct boot kernel image to use in SPL CONFIG_SYS_SPL_ARGS_ADDR Address where the kernel boot arguments are expected - this is normaly RAM-begin + 0x100 Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> CC: Tom Rini <tom.rini@gmail.com> CC: Stefano Babic <sbabic@denx.de> CC: Wolfgang Denk <wd@denx.de>
* SPL: Add YMODEM over UART load supportMatt Porter2012-03-261-0/+5
| | | | | | | | | | Adds support for loading U-Boot from UART using YMODEM protocol. If YMODEM support is enabled in SPL and the romcode indicates that SPL loaded via UART then SPL will wait for start of a YMODEM transfer via the console port. Signed-off-by: Matt Porter <mporter@ti.com> Signed-off-by: Tom Rini <trini@ti.com>
* spl.c: Use __noreturn decoratorTom Rini2012-03-261-3/+2
| | | | | Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Tom Rini <trini@ti.com>
* omap_rev_string: output to stdoutAndreas Müller2012-01-161-8/+4
| | | | | | | | * avoid potential buffer overflows * allow SPL-build not to output "Texas Instruments Revision detection unimplemented" Signed-off-by: Andreas Müller <schnitzeltony@gmx.de> Signed-off-by: Tom Rini <trini@ti.com>
* OMAP SPL: call timer_init in s_init to make udelay work earlierAndreas Müller2012-01-161-2/+0
| | | | Signed-off-by: Andreas Müller <schnitzeltony@gmx.de>
* arch/arm/cpu/armv7/omap-common/spl.c: Fix GCC 4.2 warningsAnatolij Gustschin2011-12-061-2/+3
| | | | | | | | | | | | | | Fix: spl.c: In function 'jump_to_image_no_args': spl.c:103: warning: assignment makes pointer from integer without a cast spl.c:105: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: sricharan <r.sricharan@ti.com> Cc: Tom Rini <trini@ti.com> Acked-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Tom Rini <trini@ti.com>
* OMAP3: Add SPL_BOARD_INIT hookTom Rini2011-12-061-0/+4
| | | | | | | | Add an SPL_BOARD_INIT hook and for OMAP3 have it turn on i2c. OMAP4 doesn't need i2c enabled in SPL. Enable SPL_BOARD_INIT on devkit8000. Cc: Frederik Kriewitz <frederik@kriewitz.eu> Signed-off-by: Tom Rini <trini@ti.com>
* omap: remove I2C from SPLAneesh V2011-12-061-1/+0
| | | | | | | Due to some recent changes I2C is no longer required in SPL. Remove the i2c_init() call to save some space Signed-off-by: Aneesh V <aneesh@ti.com>
* omap4/5: Add support for booting with CH.Sricharan2011-11-151-2/+7
| | | | | | | | | | | | | | | | Configuration header(CH) is 512 byte header attached to an OMAP boot image that will help ROM code to initialize clocks, SDRAM etc and copy U-Boot directly into SDRAM. CH can help us in by-passing SPL and directly boot U-boot, hence it's an alternative for SPL. However, we intend to support both CH and SPL for OMAP4/5. Initialization done through CH is limited and is not equivalent to that done by SPL. So U-Boot has to distinguish between the two cases and handle them accordingly. This patch takes care of doing this. Signed-off-by: sricharan <r.sricharan@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap/spl: actually enable the consoleIlya Yanok2011-11-031-0/+2
| | | | | | | | | Currently OMAP SPL code does all the initialization but does not set the gd->have_console value so no output is actually performed. This patch sets gd->have_console to 1. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap: spl: fix build break due to changes in FATAneesh V2011-10-271-0/+4
| | | | | | | | | | | | | | FAT library now uses malloc() and free(). But SPL doesn't have heap until now. Setup a heap in SDRAM to fix this issue. However this increases SPL footprint beyond the available SRAM budget. So, compile out some fancy features in the SDARM init bring back footprint under control CC: Sandeep Paulraj <s-paulraj@ti.com> CC: Wolfgang Denk <wd@denx.de> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* OMAP3 SPL: Provide weak omap_rev_stringTom Rini2011-10-271-0/+8
| | | | | | | | | We add an weak version of omap_rev_string in omap-common/spl.c and while at it drop the omap3 version. Move the prototype over to <asm/omap_common.h> with the other SPL functions. Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Move timestamp and version files into 'generated' subdirSimon Glass2011-10-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a rather subtle build problem where the build time stamp is not updated for out-of-tree builds if there exists an in-tree build which has a valid timestamp file. So if you do an in-tree build, then an out-of-tree build your timestamp will not change. The correct timestamp_autogenerated.h lives in the object tree, but it is not always found there. The source still lives in the source tree and when compiling version.h, it includes timestamp_autogenerated.h. Since the current directory is always searched first, this will come from the source tree rather than the object tree if it exists there. This affects dependency generation also, which means that common/cmd_version.o will not even be rebuilt if you have ever done an in-tree build. A similar problem exists with the version file. This change moves both files into the 'generated' subdir, which is already used for asm-offsets.h. Then timestamp.h and version.h are updated to include the files from there. There are other places where these generated files are included, but I cannot see why these don't just use the timestamp.h and version.h headers. So this change also tidies that up. I have tested this with in- and out-of-tree builds, but not SPL. I have looked at various other options for fixing this, including sed on the dep files, -I- and -include flags to gcc, but I don't think they can be made to work. Comments welcome. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* omap-common: reorganize spl.cSimon Schwarz2011-09-301-177/+20
| | | | | | | | | | split-up spl.c into spl.c, spl_mmc.c and spl_nand.c. This avoids problems with missing defines if a board does not use mmc or nand. This includes adding spl_ prefix to some functions which are now public. spl_image_t is now a public type. Added some of the common functions to omap-common.h Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap3: implement boot parameter savingSimon Schwarz2011-09-301-1/+5
| | | | | | | Implements the saving of boot params passed by OMAP3 ROM code. Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap-common: add nand spl supportSimon Schwarz2011-09-301-1/+45
| | | | | | | Add NAND support for the new SPL structure. Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap-common/omap4: relocate early UART clock setupSimon Schwarz2011-09-301-1/+1
| | | | | | | | | | | | | | | Moves the early UART clock setup setup_clocks_for_console() from preloader_console_init() to s_init() of OMAP4. This is done to prepare for OMAP3 integration. This patch was posted seperatly to the mailinglist but I decidet - since it is a prereqesit for this patch to add it. Former port to ML: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/104395 Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap: add MMC and FAT support to SPLAneesh V2011-08-031-2/+192
| | | | | | | | | | | | | | - Add MMC raw and FAT mode boot support for OMAP - Provide a means by which parameters passed by ROM-code can be saved in u-boot. - Save boot mode related information passed by OMAP4 ROM-code and use it to determine where to load the u-boot from - Assumes that the image has a mkimage header. Gets the payload size and load address from this header. If the header is not detected assume u-boot.bin as payload Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* omap: add basic SPL supportAneesh V2011-08-031-0/+82
- Provide alternate implementations of board_init_f() board_init_r() for OMAP spl. - Provide linker script - Initialize global data - Add serial console support - Update CONFIG_SYS_TEXT_BASE to allow for SPL's bss and move it to board config header from config.mk Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
OpenPOWER on IntegriCloud