-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: arm: imx6ul: add platform early init code
Add platform early init code. Configure ACTLR to enable SMP. Configure NSACR to let NS could access cp10/cp11 and NS_SMP. Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright (c) 2017, NXP | ||
* All rights reserved. | ||
* | ||
* Peng Fan <peng.fan@nxp.com> | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, | ||
* this list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
/* | ||
* Entry points for the A7 init. | ||
* It is assume no stack is available when these routines are called. | ||
* It is assume each routine is called with return address in LR | ||
* and with ARM registers R0, R1, R2, R3 being scratchable. | ||
*/ | ||
|
||
#include <arm32.h> | ||
#include <arm32_macros.S> | ||
#include <asm.S> | ||
#include <kernel/unwind.h> | ||
#include <platform_config.h> | ||
|
||
.section .text | ||
.balign 4 | ||
.code 32 | ||
|
||
/* | ||
* Cortex A7 configuration early configuration | ||
* | ||
* Use scratables registers R0-R3. | ||
* No stack usage. | ||
* LR store return address. | ||
* Trap CPU in case of error. | ||
*/ | ||
FUNC plat_cpu_reset_early , : | ||
UNWIND( .fnstart) | ||
|
||
mov_imm r0, 0x00000040 | ||
write_actlr r0 | ||
|
||
mov_imm r0, 0x00040C00 | ||
write_nsacr r0 | ||
|
||
bx lr | ||
UNWIND( .fnend) | ||
END_FUNC plat_cpu_reset_early |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters