Lines Matching refs:irqc
35 static void starfive_intc_bit_set(struct starfive_irq_chip *irqc, in starfive_intc_bit_set() argument
40 value = ioread32(irqc->base + reg); in starfive_intc_bit_set()
42 iowrite32(value, irqc->base + reg); in starfive_intc_bit_set()
45 static void starfive_intc_bit_clear(struct starfive_irq_chip *irqc, in starfive_intc_bit_clear() argument
50 value = ioread32(irqc->base + reg); in starfive_intc_bit_clear()
52 iowrite32(value, irqc->base + reg); in starfive_intc_bit_clear()
57 struct starfive_irq_chip *irqc = irq_data_get_irq_chip_data(d); in starfive_intc_unmask() local
59 raw_spin_lock(&irqc->lock); in starfive_intc_unmask()
60 starfive_intc_bit_clear(irqc, STARFIVE_INTC_SRC0_MASK, BIT(d->hwirq)); in starfive_intc_unmask()
61 raw_spin_unlock(&irqc->lock); in starfive_intc_unmask()
66 struct starfive_irq_chip *irqc = irq_data_get_irq_chip_data(d); in starfive_intc_mask() local
68 raw_spin_lock(&irqc->lock); in starfive_intc_mask()
69 starfive_intc_bit_set(irqc, STARFIVE_INTC_SRC0_MASK, BIT(d->hwirq)); in starfive_intc_mask()
70 raw_spin_unlock(&irqc->lock); in starfive_intc_mask()
95 struct starfive_irq_chip *irqc = irq_data_get_irq_handler_data(&desc->irq_data); in starfive_intc_irq_handler() local
102 value = ioread32(irqc->base + STARFIVE_INTC_SRC0_INT); in starfive_intc_irq_handler()
106 generic_handle_domain_irq(irqc->domain, hwirq); in starfive_intc_irq_handler()
108 starfive_intc_bit_set(irqc, STARFIVE_INTC_SRC0_CLEAR, BIT(hwirq)); in starfive_intc_irq_handler()
109 starfive_intc_bit_clear(irqc, STARFIVE_INTC_SRC0_CLEAR, BIT(hwirq)); in starfive_intc_irq_handler()
120 struct starfive_irq_chip *irqc; in starfive_intc_init() local
126 irqc = kzalloc(sizeof(*irqc), GFP_KERNEL); in starfive_intc_init()
127 if (!irqc) in starfive_intc_init()
130 irqc->base = of_iomap(intc, 0); in starfive_intc_init()
131 if (!irqc->base) { in starfive_intc_init()
159 raw_spin_lock_init(&irqc->lock); in starfive_intc_init()
161 irqc->domain = irq_domain_add_linear(intc, STARFIVE_INTC_SRC_IRQ_NUM, in starfive_intc_init()
162 &starfive_intc_domain_ops, irqc); in starfive_intc_init()
163 if (!irqc->domain) { in starfive_intc_init()
177 irqc); in starfive_intc_init()
185 irq_domain_remove(irqc->domain); in starfive_intc_init()
195 iounmap(irqc->base); in starfive_intc_init()
197 kfree(irqc); in starfive_intc_init()