wakeup-mask.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright 2010 Ben Dooks <[email protected]>
  4. *
  5. * Support for wakeup mask interrupts on newer SoCs
  6. */
  7. #ifndef __PLAT_WAKEUP_MASK_H
  8. #define __PLAT_WAKEUP_MASK_H __file__
  9. /* if no irq yet defined, but still want to mask */
  10. #define NO_WAKEUP_IRQ (0x90000000)
  11. /**
  12. * struct samsung_wakeup_mask - wakeup mask information
  13. * @irq: The interrupt associated with this wakeup.
  14. * @bit: The bit, as a (1 << bitno) controlling this source.
  15. */
  16. struct samsung_wakeup_mask {
  17. unsigned int irq;
  18. u32 bit;
  19. };
  20. /**
  21. * samsung_sync_wakemask - sync wakeup mask information for pm
  22. * @reg: The register that is used.
  23. * @masks: The list of masks to use.
  24. * @nr_masks: The number of entries pointed to buy @masks.
  25. *
  26. * Synchronise the wakeup mask information at suspend time from the list
  27. * of interrupts and control bits in @masks. We do this at suspend time
  28. * as overriding the relevant irq chips is harder and the register is only
  29. * required to be correct before we enter sleep.
  30. */
  31. extern void samsung_sync_wakemask(void __iomem *reg,
  32. const struct samsung_wakeup_mask *masks,
  33. int nr_masks);
  34. #endif /* __PLAT_WAKEUP_MASK_H */