Lines Matching +full:flags +full:- +full:mask
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org>
15 #define GT641XX_IRQ_TO_BIT(irq) (1U << (irq - GT641XX_IRQ_BASE))
21 unsigned long flags; in ack_gt641xx_irq() local
24 raw_spin_lock_irqsave(>641xx_irq_lock, flags); in ack_gt641xx_irq()
26 cause &= ~GT641XX_IRQ_TO_BIT(d->irq); in ack_gt641xx_irq()
28 raw_spin_unlock_irqrestore(>641xx_irq_lock, flags); in ack_gt641xx_irq()
33 unsigned long flags; in mask_gt641xx_irq() local
34 u32 mask; in mask_gt641xx_irq() local
36 raw_spin_lock_irqsave(>641xx_irq_lock, flags); in mask_gt641xx_irq()
37 mask = GT_READ(GT_INTRMASK_OFS); in mask_gt641xx_irq()
38 mask &= ~GT641XX_IRQ_TO_BIT(d->irq); in mask_gt641xx_irq()
39 GT_WRITE(GT_INTRMASK_OFS, mask); in mask_gt641xx_irq()
40 raw_spin_unlock_irqrestore(>641xx_irq_lock, flags); in mask_gt641xx_irq()
45 unsigned long flags; in mask_ack_gt641xx_irq() local
46 u32 cause, mask; in mask_ack_gt641xx_irq() local
48 raw_spin_lock_irqsave(>641xx_irq_lock, flags); in mask_ack_gt641xx_irq()
49 mask = GT_READ(GT_INTRMASK_OFS); in mask_ack_gt641xx_irq()
50 mask &= ~GT641XX_IRQ_TO_BIT(d->irq); in mask_ack_gt641xx_irq()
51 GT_WRITE(GT_INTRMASK_OFS, mask); in mask_ack_gt641xx_irq()
54 cause &= ~GT641XX_IRQ_TO_BIT(d->irq); in mask_ack_gt641xx_irq()
56 raw_spin_unlock_irqrestore(>641xx_irq_lock, flags); in mask_ack_gt641xx_irq()
61 unsigned long flags; in unmask_gt641xx_irq() local
62 u32 mask; in unmask_gt641xx_irq() local
64 raw_spin_lock_irqsave(>641xx_irq_lock, flags); in unmask_gt641xx_irq()
65 mask = GT_READ(GT_INTRMASK_OFS); in unmask_gt641xx_irq()
66 mask |= GT641XX_IRQ_TO_BIT(d->irq); in unmask_gt641xx_irq()
67 GT_WRITE(GT_INTRMASK_OFS, mask); in unmask_gt641xx_irq()
68 raw_spin_unlock_irqrestore(>641xx_irq_lock, flags); in unmask_gt641xx_irq()
81 u32 cause, mask; in gt641xx_irq_dispatch() local
85 mask = GT_READ(GT_INTRMASK_OFS); in gt641xx_irq_dispatch()
86 cause &= mask; in gt641xx_irq_dispatch()