18 #include <linux/types.h>
20 #include <linux/slab.h>
42 static void pq2ads_pci_mask_irq(
struct irq_data *
d)
51 setbits32(&priv->
regs->mask, 1 << irq);
58 static void pq2ads_pci_unmask_irq(
struct irq_data *
d)
67 clrbits32(&priv->
regs->mask, 1 << irq);
72 static struct irq_chip pq2ads_pci_ic = {
73 .name =
"PQ2 ADS PCI",
74 .irq_mask = pq2ads_pci_mask_irq,
75 .irq_mask_ack = pq2ads_pci_mask_irq,
76 .irq_ack = pq2ads_pci_mask_irq,
77 .irq_unmask = pq2ads_pci_unmask_irq,
78 .irq_enable = pq2ads_pci_unmask_irq,
79 .irq_disable = pq2ads_pci_mask_irq
82 static void pq2ads_pci_irq_demux(
unsigned int irq,
struct irq_desc *
desc)
97 for (bit = 0; pend != 0; ++
bit, pend <<= 1) {
98 if (pend & 0x80000000) {
106 static int pci_pic_host_map(
struct irq_domain *
h,
unsigned int virq,
116 .map = pci_pic_host_map,
152 goto out_free_bootmem;
167 irq_set_chained_handler(irq, pq2ads_pci_irq_demux);