]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/lib/crt0.S
merged tx6dl-devel into denx master branch
[karo-tx-uboot.git] / arch / arm / lib / crt0.S
index fa253191519f667a6faa295c6f09541636d0fe06..7cfc52d6c2653f0a5d8699e3b4ddb2ce329f5142 100644 (file)
@@ -3,23 +3,7 @@
  *
  *  Copyright (c) 2012  Albert ARIBAUD <albert.u.boot@aribaud.net>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <config.h>
@@ -64,7 +48,7 @@
  *    have some work left to do at this point regarding memory, so
  *    call c_runtime_cpu_setup.
  *
- * 6. Branch to either nand_boot() or board_init_r().
+ * 6. Branch to board_init_r().
  */
 
 /*
@@ -77,13 +61,10 @@ ENTRY(_main)
  * Set up initial C runtime environment and call board_init_f(0).
  */
 
-#if defined(CONFIG_NAND_SPL)
-       /* deprecated, use instead CONFIG_SPL_BUILD */
-       ldr     sp, =(CONFIG_SYS_INIT_SP_ADDR)
-#elif defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
-       ldr     sp, =(CONFIG_SPL_STACK)
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
+       ldr     sp, =CONFIG_SPL_STACK
 #else
-       ldr     sp, =(CONFIG_SYS_INIT_SP_ADDR)
+       ldr     sp, =CONFIG_SYS_INIT_SP_ADDR
 #endif
        bic     sp, sp, #7      /* 8-byte alignment for ABI compliance */
        sub     sp, #GD_SIZE    /* allocate one GD above SP */
@@ -100,13 +81,13 @@ ENTRY(_main)
  * 'here' but relocated.
  */
 
-       ldr     sp, [r8, #GD_START_ADDR_SP]     /* r8 = gd->start_addr_sp */
+       ldr     sp, [r8, #GD_START_ADDR_SP]     /* sp = gd->start_addr_sp */
        bic     sp, sp, #7      /* 8-byte alignment for ABI compliance */
        ldr     r8, [r8, #GD_BD]                /* r8 = gd->bd */
        sub     r8, r8, #GD_SIZE                /* new GD is below bd */
 
        adr     lr, here
-       ldr     r0, [r8, #GD_RELOC_OFF]         /* lr = gd->start_addr_sp */
+       ldr     r0, [r8, #GD_RELOC_OFF]         /* r0 = gd->reloc_off */
        add     lr, lr, r0
        ldr     r0, [r8, #GD_RELOCADDR]         /* r0 = gd->relocaddr */
        b       relocate_code
@@ -129,21 +110,12 @@ clbss_l:cmp       r0, r1                  /* while not at end of BSS */
        bl coloured_LED_init
        bl red_led_on
 
-#if defined(CONFIG_NAND_SPL)
-
-       /* call _nand_boot() */
-       ldr     pc, =nand_boot
-
-#else
-
        /* call board_init_r(gd_t *id, ulong dest_addr) */
        mov     r0, r8                  /* gd_t */
        ldr     r1, [r8, #GD_RELOCADDR] /* dest_addr */
        /* call board_init_r */
        ldr     pc, =board_init_r       /* this is auto-relocated! */
 
-#endif
-
        /* we should not return here. */
 
 #endif