2019-07-22 10:23:47 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019 Lexmark International, Inc.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-05-06 11:11:04 +02:00
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/device.h>
|
2025-02-10 15:19:17 -06:00
|
|
|
#include <zephyr/cache.h>
|
2023-06-29 18:22:37 +02:00
|
|
|
|
|
|
|
#include <cmsis_core.h>
|
2025-04-24 11:16:25 -06:00
|
|
|
#include "soc.h"
|
|
|
|
|
|
|
|
void sys_arch_reboot(int type)
|
|
|
|
{
|
|
|
|
ARG_UNUSED(type);
|
|
|
|
|
|
|
|
sys_write32(CRL_APB_RESET_CTRL_SRST_MASK, CRL_APB_RESET_CTRL);
|
|
|
|
}
|
2019-07-22 10:23:47 -04:00
|
|
|
|
2024-08-06 09:17:48 -04:00
|
|
|
void soc_reset_hook(void)
|
2019-10-16 16:46:48 +09:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Use normal exception vectors address range (0x0-0x1C).
|
|
|
|
*/
|
2020-02-12 14:48:21 +09:00
|
|
|
unsigned int sctlr = __get_SCTLR();
|
|
|
|
|
|
|
|
sctlr &= ~SCTLR_V_Msk;
|
|
|
|
__set_SCTLR(sctlr);
|
2019-10-16 16:46:48 +09:00
|
|
|
}
|
2025-02-10 15:19:17 -06:00
|
|
|
|
|
|
|
void soc_early_init_hook(void)
|
|
|
|
{
|
|
|
|
/* Enable caches */
|
|
|
|
sys_cache_instr_enable();
|
|
|
|
sys_cache_data_enable();
|
|
|
|
}
|