soc: arm: use sys_cache* for enabling the caches in nxp_s32
Use sys_cache* for enabling the caches in nxp_s32. This automatically considers CONFIG_CACHE_MANAGEMENT and will activate the cases only if this is active. Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
parent
7d51b7cdc1
commit
49d3244798
1 changed files with 3 additions and 7 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/init.h>
|
||||
#include <zephyr/cache.h>
|
||||
|
||||
#include <cmsis_core.h>
|
||||
#include <OsIf.h>
|
||||
|
@ -50,13 +51,8 @@ const struct ivt ivt_header __attribute__((section(".ivt_header"))) = {
|
|||
|
||||
static int soc_init(void)
|
||||
{
|
||||
SCB_EnableICache();
|
||||
|
||||
if (IS_ENABLED(CONFIG_DCACHE)) {
|
||||
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
|
||||
SCB_EnableDCache();
|
||||
}
|
||||
}
|
||||
sys_cache_instr_enable();
|
||||
sys_cache_data_enable();
|
||||
|
||||
OsIf_Init(NULL);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue