arm: spear: Simplify start.S organization
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 7 May 2019 12:18:51 +0000 (14:18 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 11 Jul 2019 14:05:15 +0000 (10:05 -0400)
There is no reason to do the few spear-related initialization, in a
different procedure than 'reset'. Spare one branching and get a linear
code flow by removing this indirection.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/cpu/arm926ejs/spear/start.S

index 2bc9d5990e1fd826781563cf62cae599087007b5..5fb2bd12ec0f454c1db92d9f74d5a990aba266f3 100644 (file)
@@ -36,20 +36,7 @@ reset:
        * UART boot, USB boot): save registers in BootROM's stack.
        */
        push    {r0-r12,lr}
-       bl      cpu_init_crit
-       pop     {r0-r12,pc}
 
-/*
- *************************************************************************
- *
- * CPU_init_critical registers
- *
- * setup important registers
- * setup memory timing
- *
- *************************************************************************
- */
-cpu_init_crit:
        /*
         * Flush v4 I/D caches
         */
@@ -67,6 +54,6 @@ cpu_init_crit:
        /*
         * Go setup Memory and board specific bits prior to relocation.
         */
-       push    {lr}
        bl      _main   /* _main will call board_init_f */
-       pop     {pc}
+
+       pop     {r0-r12,pc}