162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright 2010 Ben Dooks <ben-linux@fluff.org> 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Support for wakeup mask interrupts on newer SoCs 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef __PLAT_WAKEUP_MASK_H 962306a36Sopenharmony_ci#define __PLAT_WAKEUP_MASK_H __file__ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* if no irq yet defined, but still want to mask */ 1262306a36Sopenharmony_ci#define NO_WAKEUP_IRQ (0x90000000) 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci/** 1562306a36Sopenharmony_ci * struct samsung_wakeup_mask - wakeup mask information 1662306a36Sopenharmony_ci * @irq: The interrupt associated with this wakeup. 1762306a36Sopenharmony_ci * @bit: The bit, as a (1 << bitno) controlling this source. 1862306a36Sopenharmony_ci */ 1962306a36Sopenharmony_cistruct samsung_wakeup_mask { 2062306a36Sopenharmony_ci unsigned int irq; 2162306a36Sopenharmony_ci u32 bit; 2262306a36Sopenharmony_ci}; 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci/** 2562306a36Sopenharmony_ci * samsung_sync_wakemask - sync wakeup mask information for pm 2662306a36Sopenharmony_ci * @reg: The register that is used. 2762306a36Sopenharmony_ci * @masks: The list of masks to use. 2862306a36Sopenharmony_ci * @nr_masks: The number of entries pointed to buy @masks. 2962306a36Sopenharmony_ci * 3062306a36Sopenharmony_ci * Synchronise the wakeup mask information at suspend time from the list 3162306a36Sopenharmony_ci * of interrupts and control bits in @masks. We do this at suspend time 3262306a36Sopenharmony_ci * as overriding the relevant irq chips is harder and the register is only 3362306a36Sopenharmony_ci * required to be correct before we enter sleep. 3462306a36Sopenharmony_ci */ 3562306a36Sopenharmony_ciextern void samsung_sync_wakemask(void __iomem *reg, 3662306a36Sopenharmony_ci const struct samsung_wakeup_mask *masks, 3762306a36Sopenharmony_ci int nr_masks); 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#endif /* __PLAT_WAKEUP_MASK_H */ 40