mt_spm_sspm_intc.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2022, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef MT_SPM_SSPM_INTC_H
  7. #define MT_SPM_SSPM_INTC_H
  8. #include <mt_spm_reg.h>
  9. #define MT_SPM_SSPM_INTC_SEL_0 (0x10)
  10. #define MT_SPM_SSPM_INTC_SEL_1 (0x20)
  11. #define MT_SPM_SSPM_INTC_SEL_2 (0x40)
  12. #define MT_SPM_SSPM_INTC_SEL_3 (0x80)
  13. #define MT_SPM_SSPM_INTC_TRIGGER(id, sg) \
  14. (((0x10 << id) | (sg << id)) & 0xff)
  15. #define MT_SPM_SSPM_INTC0_HIGH MT_SPM_SSPM_INTC_TRIGGER(0, 1)
  16. #define MT_SPM_SSPM_INTC0_LOW MT_SPM_SSPM_INTC_TRIGGER(0, 0)
  17. #define MT_SPM_SSPM_INTC1_HIGH MT_SPM_SSPM_INTC_TRIGGER(1, 1)
  18. #define MT_SPM_SSPM_INTC1_LOW MT_SPM_SSPM_INTC_TRIGGER(1, 0)
  19. #define MT_SPM_SSPM_INTC2_HIGH MT_SPM_SSPM_INTC_TRIGGER(2, 1)
  20. #define MT_SPM_SSPM_INTC2_LOW MT_SPM_SSPM_INTC_TRIGGER(2, 0)
  21. #define MT_SPM_SSPM_INTC3_HIGH MT_SPM_SSPM_INTC_TRIGGER(3, 1)
  22. #define MT_SPM_SSPM_INTC3_LOW MT_SPM_SSPM_INTC_TRIGGER(3, 0)
  23. /*
  24. * mt8186 use cpc pbi as notify.
  25. * Therefore, it won't need be notified by spm driver.
  26. */
  27. #define DO_SPM_SSPM_LP_SUSPEND()
  28. #define DO_SPM_SSPM_LP_RESUME()
  29. #endif /* MT_SPM_SSPM_INTC_H */