1 /*
2  * Copyright (c) 2024 Renesas Electronics Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief System/hardware module for Renesas RA4W1 family processor
10  */
11 
12 #include <zephyr/device.h>
13 #include <zephyr/init.h>
14 #include <zephyr/kernel.h>
15 #include <zephyr/arch/cpu.h>
16 #include <cmsis_core.h>
17 #include <zephyr/arch/arm/nmi.h>
18 #include <zephyr/irq.h>
19 #include <zephyr/logging/log.h>
20 LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
21 
22 #include "bsp_cfg.h"
23 #include <bsp_api.h>
24 
25 uint32_t SystemCoreClock BSP_SECTION_EARLY_INIT;
26 
27 volatile uint32_t g_protect_pfswe_counter BSP_SECTION_EARLY_INIT;
28 
29 /**
30  * @brief Perform basic hardware initialization at boot.
31  *
32  * This needs to be run from the very beginning.
33  */
soc_early_init_hook(void)34 void soc_early_init_hook(void)
35 {
36 	SystemCoreClock = BSP_MOCO_HZ;
37 	g_protect_pfswe_counter = 0;
38 }
39