1 /* 2 * Copyright (c) 2024 TOKITA Hiroshi 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief System/hardware module for Renesas RA2A1 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_api.h> 23 24 uint32_t SystemCoreClock BSP_SECTION_EARLY_INIT; 25 26 volatile uint32_t g_protect_pfswe_counter BSP_SECTION_EARLY_INIT; 27 28 /** 29 * @brief Perform basic hardware initialization at boot. 30 * 31 * This needs to be run from the very beginning. 32 */ soc_early_init_hook(void)33void soc_early_init_hook(void) 34 { 35 SystemCoreClock = BSP_MOCO_HZ; 36 g_protect_pfswe_counter = 0; 37 bsp_clock_init(); 38 } 39