1 /*
2  * Copyright (c) 2021 IoT.bzh
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  */
7 
8 #include <zephyr/kernel.h>
9 #include <zephyr/device.h>
10 #include <zephyr/sys/barrier.h>
11 
soc_reset_hook(void)12 void soc_reset_hook(void)
13 {
14 	L1C_DisableCaches();
15 	L1C_DisableBTAC();
16 
17 	/* Invalidate instruction cache and flush branch target cache */
18 	__set_ICIALLU(0);
19 	barrier_dsync_fence_full();
20 	barrier_isync_fence_full();
21 
22 	L1C_EnableCaches();
23 	L1C_EnableBTAC();
24 }
25