sh: add romImage MMCIF boot for sh7724 and Ecovec V2
[safe/jmp/linux-2.6] / arch / sh / boot / romimage / head.S
index 65b8256..4671d1b 100644 (file)
@@ -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