wakeup-mask.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* arch/arm/plat-samsung/include/plat/wakeup-mask.h
  2. *
  3. * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
  4. *
  5. * Support for wakeup mask interrupts on newer SoCs
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. */
  12. #ifndef __PLAT_WAKEUP_MASK_H
  13. #define __PLAT_WAKEUP_MASK_H __file__
  14. /* if no irq yet defined, but still want to mask */
  15. #define NO_WAKEUP_IRQ (0x90000000)
  16. /**
  17. * struct samsung_wakeup_mask - wakeup mask information
  18. * @irq: The interrupt associated with this wakeup.
  19. * @bit: The bit, as a (1 << bitno) controlling this source.
  20. */
  21. struct samsung_wakeup_mask {
  22. unsigned int irq;
  23. u32 bit;
  24. };
  25. /**
  26. * samsung_sync_wakemask - sync wakeup mask information for pm
  27. * @reg: The register that is used.
  28. * @masks: The list of masks to use.
  29. * @nr_masks: The number of entries pointed to buy @masks.
  30. *
  31. * Synchronise the wakeup mask information at suspend time from the list
  32. * of interrupts and control bits in @masks. We do this at suspend time
  33. * as overriding the relevant irq chips is harder and the register is only
  34. * required to be correct before we enter sleep.
  35. */
  36. extern void samsung_sync_wakemask(void __iomem *reg,
  37. struct samsung_wakeup_mask *masks,
  38. int nr_masks);
  39. #endif /* __PLAT_WAKEUP_MASK_H */