@@ -16,26 +16,5 @@
#include <linux/linkage.h>
ENTRY(lowlevel_init)
- /*
- * Setup a temporary stack
- */
- ldr sp, =CONFIG_SYS_INIT_SP_ADDR
- bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
-#ifdef CONFIG_SPL_BUILD
- ldr r8, =gdata
-#else
- sub sp, #GD_SIZE
- bic sp, sp, #7
- mov r8, sp
-#endif
- /*
- * Save the old lr(passed in ip) and the current lr to stack
- */
- push {ip, lr}
-
- /*
- * go setup pll, mux, memory
- */
- bl s_init
- pop {ip, pc}
+ mov pc, lr
ENDPROC(lowlevel_init)
@@ -197,22 +197,22 @@ pll_div_val5:
#endif
ENTRY(lowlevel_init)
+#if !defined(CONFIG_SYS_NAND_BOOT) && !defined(CONFIG_SYS_ONENAND_BOOT)
ldr sp, SRAM_STACK
str ip, [sp] /* stash ip register */
mov ip, lr /* save link reg across call */
-#if !defined(CONFIG_SYS_NAND_BOOT) && !defined(CONFIG_SYS_ONENAND_BOOT)
/*
* No need to copy/exec the clock code - DPLL adjust already done
* in NAND/oneNAND Boot.
*/
ldr r1, =SRAM_CLK_CODE
bl cpy_clk_code
-#endif /* NAND Boot */
+
mov lr, ip /* restore link reg */
ldr ip, [sp] /* restore save ip */
- /* tail-call s_init to setup pll, mux, memory */
- b s_init
+#endif /* NAND Boot */
+ mov pc, lr
ENDPROC(lowlevel_init)
/* the literal pools origin */
@@ -59,14 +59,8 @@ loop0:
subs r0, r0, #1
bne loop0
- ldr sp, MERAM_STACK
- b s_init
-
.pool
.align 4
ENDPROC(lowlevel_init)
.ltorg
-
-MERAM_STACK:
- .word LOW_LEVEL_MERAM_STACK
@@ -70,6 +70,9 @@ ENTRY(_main)
sub sp, #GD_SIZE /* allocate one GD above SP */
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
mov r8, sp /* GD is above SP */
+
+ bl s_init
+
mov r0, #0
bl board_init_f
@@ -35,3 +35,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/*NOTREACHED*/
return 0;
}
+
+/* HACK */
+__weak void s_init(void)
+{
+}
@@ -296,17 +296,6 @@ common_tc:
ldr sp, SRAM_STACK
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
- /*
- * Save the old lr(passed in ip) and the current lr to stack
- */
- push {ip, lr}
-
- /*
- * go setup pll, mux, memory
- */
- bl s_init
- pop {ip, pc}
-
/* back to arch calling code */
mov pc, lr