Krzysztof Kozlowski | 4490e3c | 2017-12-25 20:54:35 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
Ben Dooks | 0317e52 | 2010-05-20 14:05:33 +0900 | [diff] [blame] | 3 | * Copyright 2010 Ben Dooks <ben-linux@fluff.org> |
| 4 | * |
| 5 | * Support for wakeup mask interrupts on newer SoCs |
Krzysztof Kozlowski | 4490e3c | 2017-12-25 20:54:35 +0100 | [diff] [blame] | 6 | */ |
Ben Dooks | 0317e52 | 2010-05-20 14:05:33 +0900 | [diff] [blame] | 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, |
Krzysztof Kozlowski | 9060a41 | 2016-12-10 15:47:36 +0200 | [diff] [blame] | 36 | const struct samsung_wakeup_mask *masks, |
Ben Dooks | 0317e52 | 2010-05-20 14:05:33 +0900 | [diff] [blame] | 37 | int nr_masks); |
| 38 | |
| 39 | #endif /* __PLAT_WAKEUP_MASK_H */ |