summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/xload.c
diff options
context:
space:
mode:
authorTeresa Gámez <t.gamez@phytec.de>2013-07-09 11:23:20 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-07-10 23:30:42 +0200
commitc5c875ab7f442365a0c4c453238ef0a8a4ebb2d0 (patch)
tree81181793c30c35bf9bb169df7965b4a3f586204d /arch/arm/mach-omap/xload.c
parentf0c0d46f6465fc348591258935f573aab4014c7a (diff)
downloadbarebox-c5c875ab7f442365a0c4c453238ef0a8a4ebb2d0.tar.gz
barebox-c5c875ab7f442365a0c4c453238ef0a8a4ebb2d0.tar.xz
arm: omap: store boot source info from ROM loader
The ROM loader passes the address of a buffer to the MLO in register 0. Store this data so we can find the boot source later. On the same way the bootinformation are passed to the barebox, then. It has to be enshured that r0 contains always the buffer or the boot source detection will not work. Applied this on all OMAPs. This patch is based on work of Jan Luebbe <jlu@pengutronix.de>. Compile tested on all OMAP boards. Tested on pcm049, phyCARD-A-L1 and pcm051. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Tested-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/xload.c')
-rw-r--r--arch/arm/mach-omap/xload.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index 3cce3f2be9..3dbdef516f 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -9,6 +9,7 @@
#include <fcntl.h>
#include <sizes.h>
#include <filetype.h>
+#include <mach/generic.h>
static void *read_image_head(const char *name)
{
@@ -163,7 +164,8 @@ static void *omap4_xload_boot_usb(void){
*/
static __noreturn int omap_xload(void)
{
- int (*func)(void) = NULL;
+ int (*func)(void *) = NULL;
+ uint32_t *arg;
switch (bootsource_get())
{
@@ -198,8 +200,10 @@ static __noreturn int omap_xload(void)
while (1);
}
+ arg = (uint32_t *)&omap_bootinfo;
+
shutdown_barebox();
- func();
+ func(arg);
while (1);
}