soc: nordic: vpr: add enabling of RT peripherals in PRE_KERNEL
Real Time peripherals should be enabled by default. Add a common initialization point for all VPRs and enable them. Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
This commit is contained in:
parent
e014c032de
commit
63a5f97019
2 changed files with 20 additions and 1 deletions
|
@ -3,6 +3,6 @@
|
|||
|
||||
zephyr_include_directories(.)
|
||||
|
||||
zephyr_library_sources(soc_context.S soc_idle.c)
|
||||
zephyr_library_sources(soc_context.S soc_idle.c soc_init.c)
|
||||
|
||||
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/riscv/common/linker.ld CACHE INTERNAL "")
|
||||
|
|
19
soc/nordic/common/vpr/soc_init.c
Normal file
19
soc/nordic/common/vpr/soc_init.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Nordic Semiconductor ASA
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/init.h>
|
||||
#include <hal/nrf_vpr_csr.h>
|
||||
|
||||
static int vpr_init(void)
|
||||
{
|
||||
/* RT peripherals for VPR all share one enable.
|
||||
* To prevent redundant calls, do it here once.
|
||||
*/
|
||||
nrf_vpr_csr_rtperiph_enable_set(true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(vpr_init, PRE_KERNEL_1, 0);
|
Loading…
Add table
Add a link
Reference in a new issue