fsl_pm.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Support Power Management
  4. *
  5. * Copyright 2014-2015 Freescale Semiconductor Inc.
  6. */
  7. #ifndef __PPC_FSL_PM_H
  8. #define __PPC_FSL_PM_H
  9. #define E500_PM_PH10 1
  10. #define E500_PM_PH15 2
  11. #define E500_PM_PH20 3
  12. #define E500_PM_PH30 4
  13. #define E500_PM_DOZE E500_PM_PH10
  14. #define E500_PM_NAP E500_PM_PH15
  15. #define PLAT_PM_SLEEP 20
  16. #define PLAT_PM_LPM20 30
  17. #define FSL_PM_SLEEP (1 << 0)
  18. #define FSL_PM_DEEP_SLEEP (1 << 1)
  19. struct fsl_pm_ops {
  20. /* mask pending interrupts to the RCPM from MPIC */
  21. void (*irq_mask)(int cpu);
  22. /* unmask pending interrupts to the RCPM from MPIC */
  23. void (*irq_unmask)(int cpu);
  24. void (*cpu_enter_state)(int cpu, int state);
  25. void (*cpu_exit_state)(int cpu, int state);
  26. void (*cpu_up_prepare)(int cpu);
  27. void (*cpu_die)(int cpu);
  28. int (*plat_enter_sleep)(void);
  29. void (*freeze_time_base)(bool freeze);
  30. /* keep the power of IP blocks during sleep/deep sleep */
  31. void (*set_ip_power)(bool enable, u32 mask);
  32. /* get platform supported power management modes */
  33. unsigned int (*get_pm_modes)(void);
  34. };
  35. extern const struct fsl_pm_ops *qoriq_pm_ops;
  36. int __init fsl_rcpm_init(void);
  37. #endif /* __PPC_FSL_PM_H */