a033683783
This commit renames the `cortex_r` directory under the AArch32 to `cortex_a_r`, in preparation for the AArch32 Cortex-A support. The rationale for this renaming is that the Cortex-A and Cortex-R share the same base design and the difference between them, other than the MPU vs. MMU, is minimal. Since most of the architecture port code and configurations will be shared between the Cortex-A and Cortex-R architectures, it is advantageous to have them together in the same directory. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
42 lines
734 B
C
42 lines
734 B
C
/*
|
|
* Copyright (c) 2019 Lexmark International, Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
*/
|
|
|
|
#include <kernel.h>
|
|
#include <device.h>
|
|
#include <init.h>
|
|
#include <arch/arm/aarch32/cortex_a_r/cmsis.h>
|
|
|
|
/**
|
|
*
|
|
* @brief Perform basic hardware initialization
|
|
*
|
|
* @return 0
|
|
*/
|
|
|
|
static int soc_init(struct device *arg)
|
|
{
|
|
ARG_UNUSED(arg);
|
|
|
|
/* Install default handler that simply resets the CPU
|
|
* if configured in the kernel, NOP otherwise
|
|
*/
|
|
NMI_INIT();
|
|
return 0;
|
|
}
|
|
|
|
SYS_INIT(soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
|
|
|
void z_platform_init(void)
|
|
{
|
|
/*
|
|
* Use normal exception vectors address range (0x0-0x1C).
|
|
*/
|
|
unsigned int sctlr = __get_SCTLR();
|
|
|
|
sctlr &= ~SCTLR_V_Msk;
|
|
__set_SCTLR(sctlr);
|
|
}
|