barebox/arch/arm/mach-omap/omap_bootinfo.S
Teresa Gámez c5c875ab7f 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>
2013-07-10 23:30:42 +02:00

26 lines
494 B
ArmAsm

#include <config.h>
#include <linux/linkage.h>
#include <asm/assembler.h>
.section ".text_bare_init","ax"
.globl omap_bootinfo
omap_bootinfo:
.word 0x0
.word 0x0
.word 0x0
.section ".text_bare_init","ax"
ENTRY(omap_save_bootinfo)
/*
* save data from rom boot loader
*/
adr r2, omap_bootinfo
ldr r1, [r0, #0x00]
str r1, [r2, #0x00]
ldr r1, [r0, #0x04]
str r1, [r2, #0x04]
ldr r1, [r0, #0x08]
str r1, [r2, #0x08]
mov pc, lr
ENDPROC(omap_save_bootinfo)