18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ASM_IDLE_H 38c2ecf20Sopenharmony_ci#define __ASM_IDLE_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/cpuidle.h> 68c2ecf20Sopenharmony_ci#include <linux/linkage.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciextern void (*cpu_wait)(void); 98c2ecf20Sopenharmony_ciextern void r4k_wait(void); 108c2ecf20Sopenharmony_ciextern asmlinkage void __r4k_wait(void); 118c2ecf20Sopenharmony_ciextern void r4k_wait_irqoff(void); 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistatic inline int using_rollback_handler(void) 148c2ecf20Sopenharmony_ci{ 158c2ecf20Sopenharmony_ci return cpu_wait == r4k_wait; 168c2ecf20Sopenharmony_ci} 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciextern void __init check_wait(void); 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciextern int mips_cpuidle_wait_enter(struct cpuidle_device *dev, 218c2ecf20Sopenharmony_ci struct cpuidle_driver *drv, int index); 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define MIPS_CPUIDLE_WAIT_STATE {\ 248c2ecf20Sopenharmony_ci .enter = mips_cpuidle_wait_enter,\ 258c2ecf20Sopenharmony_ci .exit_latency = 1,\ 268c2ecf20Sopenharmony_ci .target_residency = 1,\ 278c2ecf20Sopenharmony_ci .power_usage = UINT_MAX,\ 288c2ecf20Sopenharmony_ci .name = "wait",\ 298c2ecf20Sopenharmony_ci .desc = "MIPS wait",\ 308c2ecf20Sopenharmony_ci} 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#endif /* __ASM_IDLE_H */ 33