2020-10-17 03:00:13 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2019-2020 Cobham Gaisler AB
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 17:11:04 +08:00
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/tracing/tracing.h>
|
2020-10-17 03:00:13 +08:00
|
|
|
|
|
|
|
static void leon_idle(unsigned int key)
|
|
|
|
{
|
2020-11-16 19:24:58 +08:00
|
|
|
sys_trace_idle();
|
2020-10-17 03:00:13 +08:00
|
|
|
irq_unlock(key);
|
|
|
|
|
|
|
|
__asm__ volatile ("wr %g0, %asr19");
|
|
|
|
}
|
|
|
|
|
|
|
|
void arch_cpu_idle(void)
|
|
|
|
{
|
|
|
|
leon_idle(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void arch_cpu_atomic_idle(unsigned int key)
|
|
|
|
{
|
|
|
|
leon_idle(key);
|
|
|
|
}
|