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 RA6M1 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/irq.h> 18 #include <zephyr/logging/log.h> 19 LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL); 20 21 #include "bsp_cfg.h" 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 uint32_t key; 36 37 key = irq_lock(); 38 39 SystemCoreClock = BSP_MOCO_HZ; 40 g_protect_pfswe_counter = 0; 41 42 irq_unlock(key); 43 } 44