]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/arm926ejs/mxs/start.S
Update from 2013.01 to 2013.07
[karo-tx-uboot.git] / arch / arm / cpu / arm926ejs / mxs / start.S
index 7ccd3371746d8fd91284311ff6387d0cbf3c9f28..6a32038d346de25de47c4043ce73995644f60a0c 100644 (file)
  * Copyright (c) 2011 Marek Vasut <marek.vasut@gmail.com>
  * on behalf of DENX Software Engineering GmbH
  *
- * 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 <asm-offsets.h>
 .globl _start
 _start:
        b       reset
-       b       undefined_instruction
-       b       software_interrupt
-       b       prefetch_abort
-       b       data_abort
-       b       not_used
-       b       irq
-       b       fiq
-
+       ldr     pc, _undefined_instruction
+       ldr     pc, _software_interrupt
+       ldr     pc, _prefetch_abort
+       ldr     pc, _data_abort
+       ldr     pc, _not_used
+       ldr     pc, _irq
+       ldr     pc, _fiq
+
+#ifdef CONFIG_SPL_BUILD
+_undefined_instruction:
+       .word   _undefined_instruction
+_software_interrupt:
+       .word   _software_interrupt
+_prefetch_abort:
+       .word   _prefetch_abort
+_data_abort:
+       .word   _data_abort
+_not_used:
+       .word   _not_used
+_irq:
+       .word   _irq
+_fiq:
+       .word   _fiq
+#else
 /*
  * Vector table, located at address 0x20.
  * This table allows the code running AFTER SPL, the U-Boot, to install it's
@@ -68,41 +68,22 @@ _start:
  * SPLs. So if interrupt happens in U-Boot, the SPLs interrupt vectoring table
  * is still used.
  */
-_vt_reset:
-       .word   _reset
-_vt_undefined_instruction:
-       .word   _hang
-_vt_software_interrupt:
-       .word   _hang
-_vt_prefetch_abort:
-       .word   _hang
-_vt_data_abort:
-       .word   _hang
-_vt_not_used:
-       .word   _reset
-_vt_irq:
-       .word   _hang
-_vt_fiq:
-       .word   _hang
-
-reset:
-       ldr     pc, _vt_reset
-undefined_instruction:
-       ldr     pc, _vt_undefined_instruction
-software_interrupt:
-       ldr     pc, _vt_software_interrupt
-prefetch_abort:
-       ldr     pc, _vt_prefetch_abort
-data_abort:
-       ldr     pc, _vt_data_abort
-not_used:
-       ldr     pc, _vt_not_used
-irq:
-       ldr     pc, _vt_irq
-fiq:
-       ldr     pc, _vt_fiq
-
-       .balignl 16,0xdeadbeef
+_undefined_instruction:
+       .word   undefined_instruction
+_software_interrupt:
+       .word   software_interrupt
+_prefetch_abort:
+       .word   prefetch_abort
+_data_abort:
+       .word   data_abort
+_not_used:
+       .word   not_used
+_irq:
+       .word   irq
+_fiq:
+       .word   fiq
+#endif /* CONFIG_SPL_BUILD */
+       .balignl 16, 0xdeadbeef
 
 /*
  *************************************************************************
@@ -119,7 +100,11 @@ fiq:
 
 .globl _TEXT_BASE
 _TEXT_BASE:
+#ifdef CONFIG_SPL_TEXT_BASE
+       .word   CONFIG_SPL_TEXT_BASE
+#else
        .word   CONFIG_SYS_TEXT_BASE
+#endif
 
 /*
  * These are defined in the board-specific linker script.
@@ -133,7 +118,7 @@ _bss_start_ofs:
 
 .globl _bss_end_ofs
 _bss_end_ofs:
-       .word __bss_end__ - _start
+       .word __bss_end - _start
 
 .globl _end_ofs
 _end_ofs:
@@ -160,7 +145,7 @@ IRQ_STACK_START_IN:
  * the actual reset code
  */
 
-_reset:
+reset:
        /*
         * Store all registers on old stack pointer, this will allow us later to
         * return to the BootROM and let the BootROM load U-Boot into RAM.
@@ -199,7 +184,3 @@ _reset:
        pop     {r0-r12,r14}
        bx      lr
 
-_hang:
-       ldr     sp, _TEXT_BASE                  /* switch to abort stack */
-1:
-       bl      1b                              /* hang and never return */