psci.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License version 2 as
  4. * published by the Free Software Foundation.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. * GNU General Public License for more details.
  10. *
  11. * Copyright (C) 2012 ARM Limited
  12. */
  13. #ifndef __ASM_ARM_PSCI_H
  14. #define __ASM_ARM_PSCI_H
  15. #define PSCI_POWER_STATE_TYPE_STANDBY 0
  16. #define PSCI_POWER_STATE_TYPE_POWER_DOWN 1
  17. struct psci_power_state {
  18. u16 id;
  19. u8 type;
  20. u8 affinity_level;
  21. };
  22. struct psci_operations {
  23. int (*cpu_suspend)(struct psci_power_state state,
  24. unsigned long entry_point);
  25. int (*cpu_off)(struct psci_power_state state);
  26. int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
  27. int (*migrate)(unsigned long cpuid);
  28. };
  29. extern struct psci_operations psci_ops;
  30. extern struct smp_operations psci_smp_ops;
  31. #ifdef CONFIG_ARM_PSCI
  32. void psci_init(void);
  33. bool psci_smp_available(void);
  34. #else
  35. static inline void psci_init(void) { }
  36. static inline bool psci_smp_available(void) { return false; }
  37. #endif
  38. #endif /* __ASM_ARM_PSCI_H */