2016-04-22 05:47:09 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Intel Corporation
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-04-22 05:47:09 +08:00
|
|
|
*/
|
|
|
|
|
2022-05-06 16:49:15 +08:00
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/kernel_structs.h>
|
2016-04-22 05:47:09 +08:00
|
|
|
|
2024-07-05 17:52:13 +08:00
|
|
|
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_IDLE
|
2019-11-08 04:43:29 +08:00
|
|
|
void arch_cpu_idle(void)
|
2016-04-22 05:47:09 +08:00
|
|
|
{
|
2016-06-30 05:58:49 +08:00
|
|
|
/* Do nothing but unconditionally unlock interrupts and return to the
|
|
|
|
* caller. This CPU does not have any kind of power saving instruction.
|
2016-06-08 01:26:57 +08:00
|
|
|
*/
|
2016-06-30 05:58:49 +08:00
|
|
|
irq_unlock(NIOS2_STATUS_PIE_MSK);
|
2016-04-22 05:47:09 +08:00
|
|
|
}
|
2024-07-05 02:37:08 +08:00
|
|
|
#endif
|
2016-04-22 05:47:09 +08:00
|
|
|
|
2024-07-05 17:52:13 +08:00
|
|
|
#ifndef CONFIG_ARCH_HAS_CUSTOM_CPU_ATOMIC_IDLE
|
2019-11-08 04:43:29 +08:00
|
|
|
void arch_cpu_atomic_idle(unsigned int key)
|
2016-04-22 05:47:09 +08:00
|
|
|
{
|
2016-06-08 01:26:57 +08:00
|
|
|
/* Do nothing but restore IRQ state. This CPU does not have any
|
|
|
|
* kind of power saving instruction.
|
|
|
|
*/
|
|
|
|
irq_unlock(key);
|
2016-04-22 05:47:09 +08:00
|
|
|
}
|
2024-07-05 02:37:08 +08:00
|
|
|
#endif
|