1 /*
2  * Copyright (c) 2018 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief System/hardware module for Nordic Semiconductor nRF91 family processor
10  *
11  * This module provides routines to initialize and support board-level hardware
12  * for the Nordic Semiconductor nRF91 family processor.
13  */
14 
15 #include <zephyr/kernel.h>
16 #include <zephyr/init.h>
17 #include <soc/nrfx_coredep.h>
18 #include <zephyr/logging/log.h>
19 
20 #include <cmsis_core.h>
21 
22 #define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
23 LOG_MODULE_REGISTER(soc);
24 
nordicsemi_nrf91_init(void)25 static int nordicsemi_nrf91_init(void)
26 {
27 #ifdef CONFIG_NRF_ENABLE_ICACHE
28 	/* Enable the instruction cache */
29 	NRF_NVMC->ICACHECNF = NVMC_ICACHECNF_CACHEEN_Msk;
30 #endif
31 
32 	return 0;
33 }
34 
arch_busy_wait(uint32_t time_us)35 void arch_busy_wait(uint32_t time_us)
36 {
37 	nrfx_coredep_delay_us(time_us);
38 }
39 
40 SYS_INIT(nordicsemi_nrf91_init, PRE_KERNEL_1, 0);
41