summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/omap-common/spl.c
diff options
context:
space:
mode:
authorSricharan <r.sricharan@ti.com>2011-11-15 09:50:03 -0500
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-11-15 22:25:50 +0100
commit78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e (patch)
treec124c8e56d72e9e46f70516fa9dd3dabdac22d9a /arch/arm/cpu/armv7/omap-common/spl.c
parentbb772a594493092adfb18a56889e0bce855eed99 (diff)
downloadu-boot-imx-78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e.zip
u-boot-imx-78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e.tar.gz
u-boot-imx-78f455c055ddf55a1a2dd6ae5e2d060ed2e5bd0e.tar.bz2
omap4/5: Add support for booting with CH.
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>
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common/spl.c')
-rw-r--r--arch/arm/cpu/armv7/omap-common/spl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c
index 2c59d2b..d6d7d65 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -38,6 +38,7 @@
DECLARE_GLOBAL_DATA_PTR;
+u32* boot_params_ptr = NULL;
struct spl_image_info spl_image;
/* Define global data structure pointer to it*/
@@ -92,12 +93,16 @@ void spl_parse_image_header(const struct image_header *header)
static void jump_to_image_no_args(void)
{
- typedef void (*image_entry_noargs_t)(void)__attribute__ ((noreturn));
+ typedef void (*image_entry_noargs_t)(u32 *)__attribute__ ((noreturn));
image_entry_noargs_t image_entry =
(image_entry_noargs_t) spl_image.entry_point;
debug("image entry point: 0x%X\n", spl_image.entry_point);
- image_entry();
+ /* Pass the saved boot_params from rom code */
+#if defined(CONFIG_VIRTIO) || defined(CONFIG_ZEBU)
+ image_entry = 0x80100000;
+#endif
+ image_entry((u32 *)&boot_params_ptr);
}
void jump_to_image_no_args(void) __attribute__ ((noreturn));