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