]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/sunxi/psci_head.S
ARM: PSCI: Split out common stack setup code from psci_arch_init
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / sunxi / psci_head.S
1 /*
2  * Copyright (C) 2013 - ARM Ltd
3  * Author: Marc Zyngier <marc.zyngier@arm.com>
4  *
5  * Based on code by Carl van Schaik <carl@ok-labs.com>.
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #include <config.h>
21 #include <linux/linkage.h>
22
23 #include <asm/arch-armv7/generictimer.h>
24 #include <asm/gic.h>
25 #include <asm/macro.h>
26 #include <asm/psci.h>
27 #include <asm/arch/cpu.h>
28
29 /*
30  * Memory layout:
31  *
32  * SECURE_RAM to text_end :
33  *      ._secure_text section
34  * text_end to ALIGN_PAGE(text_end):
35  *      nothing
36  * ALIGN_PAGE(text_end) to ALIGN_PAGE(text_end) + 0x1000)
37  *      1kB of stack per CPU (4 CPUs max).
38  */
39
40         .pushsection ._secure.text, "ax"
41
42         .arch_extension sec
43
44 #define GICD_BASE               (SUNXI_GIC400_BASE +  0x1000)
45 #define GICC_BASE               (SUNXI_GIC400_BASE +  0x2000)
46
47 ENTRY(psci_arch_init)
48         b       sunxi_gic_init
49 ENDPROC(psci_arch_init)
50
51 ENTRY(psci_text_end)
52         .popsection