cpuidle.h 839 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __ASM_ARM_CPUIDLE_H
  2. #define __ASM_ARM_CPUIDLE_H
  3. #ifdef CONFIG_CPU_IDLE
  4. extern int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
  5. struct cpuidle_driver *drv, int index);
  6. #else
  7. static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
  8. struct cpuidle_driver *drv, int index) { return -ENODEV; }
  9. #endif
  10. /* Common ARM WFI state */
  11. #define ARM_CPUIDLE_WFI_STATE_PWR(p) {\
  12. .enter = arm_cpuidle_simple_enter,\
  13. .exit_latency = 1,\
  14. .target_residency = 1,\
  15. .power_usage = p,\
  16. .flags = CPUIDLE_FLAG_TIME_VALID,\
  17. .name = "WFI",\
  18. .desc = "ARM WFI",\
  19. }
  20. /*
  21. * in case power_specified == 1, give a default WFI power value needed
  22. * by some governors
  23. */
  24. #define ARM_CPUIDLE_WFI_STATE ARM_CPUIDLE_WFI_STATE_PWR(UINT_MAX)
  25. #endif