From 4705b2e8047221142af2ed5e37f54ac4c7f80a7d Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Tue, 18 May 2010 14:43:15 +0000 Subject: 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 Signed-off-by: Paul Mundt --- arch/sh/boot/romimage/head.S | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'arch/sh/boot/romimage/head.S') diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S index 65b8256d81cb..4671d1b82150 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 +#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 -- cgit v1.2.3