On ArchosG9 the second stage low-level init was the fallback default.
 Now that the low-level init is forcibly enabled it has to be skipped
 when already executed from first stage.

Signed-off-by: Vicente Bergas <[email protected]>
---
 arch/arm/boards/archosg9/lowlevel.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boards/archosg9/lowlevel.c 
b/arch/arm/boards/archosg9/lowlevel.c
index 552268f..0334693 100644
--- a/arch/arm/boards/archosg9/lowlevel.c
+++ b/arch/arm/boards/archosg9/lowlevel.c
@@ -63,15 +63,18 @@ static noinline void archosg9_init_lowlevel(void)
        omap4_configure_usb_dpll(&usb);
 
        omap4_ddr_init(&ddr_regs_400_mhz_2cs, &core);
-
-       barebox_arm_entry(0x80000000, SZ_1G, 0);
 }
 
 void __naked __bare_init barebox_arm_reset_vector(void)
 {
        arm_cpu_lowlevel_init();
 
+       if (get_pc() > 0x80000000)
+               goto out;
+
        arm_setup_stack(0x4030d000);
 
        archosg9_init_lowlevel();
+out:
+       barebox_arm_entry(0x80000000, SZ_1G, 0);
 }
-- 
1.8.1.3


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to