1 /*
2  * Copyright (c) 2019-2020 Cobham Gaisler AB
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include <zephyr/tracing/tracing.h>
9 
leon_idle(unsigned int key)10 static void leon_idle(unsigned int key)
11 {
12 	sys_trace_idle();
13 	irq_unlock(key);
14 
15 	__asm__ volatile ("wr  %g0, %asr19");
16 }
17 
arch_cpu_idle(void)18 void arch_cpu_idle(void)
19 {
20 	leon_idle(0);
21 }
22 
arch_cpu_atomic_idle(unsigned int key)23 void arch_cpu_atomic_idle(unsigned int key)
24 {
25 	leon_idle(key);
26 }
27