]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/socfpga/lowlevel_init.S
arm: move exception handling out of start.S files
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / socfpga / lowlevel_init.S
1 /*
2  *  Copyright (C) 2012 Altera Corporation <www.altera.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <config.h>
8 #include <version.h>
9
10 /* Save the parameter pass in by previous boot loader */
11 .global save_boot_params
12 save_boot_params:
13         /* no parameter to save */
14         bx      lr
15
16
17 /* Set up the platform, once the cpu has been initialized */
18 .globl lowlevel_init
19 lowlevel_init:
20
21         /* Remap */
22 #ifdef CONFIG_SPL_BUILD
23         /*
24          * SPL : configure the remap (L3 NIC-301 GPV)
25          * so the on-chip RAM at lower memory instead ROM.
26          */
27         ldr     r0, =SOCFPGA_L3REGS_ADDRESS
28         mov     r1, #0x19
29         str     r1, [r0]
30 #else
31         /*
32          * U-Boot : configure the remap (L3 NIC-301 GPV)
33          * so the SDRAM at lower memory instead on-chip RAM.
34          */
35         ldr     r0, =SOCFPGA_L3REGS_ADDRESS
36         mov     r1, #0x2
37         str     r1, [r0]
38
39         /* Private components security */
40
41         /*
42          * U-Boot : configure private timer, global timer and cpu
43          * component access as non secure for kernel stage (as required
44          * by kernel)
45          */
46         mrc     p15,4,r0,c15,c0,0
47         add     r1, r0, #0x54
48         ldr     r2, [r1]
49         orr     r2, r2, #0xff
50         orr     r2, r2, #0xf00
51         str     r2, [r1]
52 #endif  /* #ifdef CONFIG_SPL_BUILD */
53         mov     pc, lr