summaryrefslogtreecommitdiff
path: root/arch/sh/boot/romimage/head.S
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-05-18 14:43:15 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2010-05-31 04:11:54 (GMT)
commit4705b2e8047221142af2ed5e37f54ac4c7f80a7d (patch)
tree5e0d52a2f3ffebfd56f1f2d69f6be3b7ac72d7ad /arch/sh/boot/romimage/head.S
parent8a768952ca8cb5cad98cfa343e6fb131e3bbdc3e (diff)
downloadlinux-4705b2e8047221142af2ed5e37f54ac4c7f80a7d.tar.xz
sh: add romImage MMCIF boot for sh7724 and Ecovec V2
This patch is V2 of the MMCIF romImage boot support for sh7724 and the Ecovec board. With this patch applied and CONFIG_ROMIMAGE_MMCIF selected the romImage kernel image can be written to a MMC card and booted directly by the sh7724 cpu. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boot/romimage/head.S')
-rw-r--r--arch/sh/boot/romimage/head.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S
index 65b8256..4671d1b 100644
--- a/arch/sh/boot/romimage/head.S
+++ b/arch/sh/boot/romimage/head.S
@@ -12,6 +12,36 @@ romstart:
/* include board specific setup code */
#include <mach/romimage.h>
+#ifdef CONFIG_ROMIMAGE_MMCIF
+ /* load the romImage to above the empty zero page */
+ mov.l empty_zero_page_dst, r4
+ mov.l empty_zero_page_dst_adj, r5
+ add r5, r4
+ mov.l bytes_to_load, r5
+ mov.l loader_function, r7
+ jsr @r7
+ mov r4, r15
+
+ mov.l empty_zero_page_dst, r4
+ mov.l empty_zero_page_dst_adj, r5
+ add r5, r4
+ mov.l loaded_code_offs, r5
+ add r5, r4
+ jmp @r4
+ nop
+
+ .balign 4
+empty_zero_page_dst_adj:
+ .long PAGE_SIZE
+bytes_to_load:
+ .long end_data - romstart
+loader_function:
+ .long mmcif_loader
+loaded_code_offs:
+ .long loaded_code - romstart
+loaded_code:
+#endif /* CONFIG_ROMIMAGE_MMCIF */
+
/* copy the empty_zero_page contents to where vmlinux expects it */
mova extra_data_pos, r0
mov.l extra_data_size, r1