17 #include <linux/kernel.h>
31 #define MISC_IGNORE 0x12
36 #define PCI_IGNORE 0x00
50 irq_to_pic_mask(
unsigned int irq)
56 irq_to_pic_bit(
unsigned int irq)
58 return 1 << (irq & 0x7);
64 unsigned int cpld_irq = (
unsigned int)irqd_to_hwirq(d);
65 void __iomem *pic_mask = irq_to_pic_mask(cpld_irq);
68 in_8(pic_mask) | irq_to_pic_bit(cpld_irq));
74 unsigned int cpld_irq = (
unsigned int)irqd_to_hwirq(d);
75 void __iomem *pic_mask = irq_to_pic_mask(cpld_irq);
78 in_8(pic_mask) & ~irq_to_pic_bit(cpld_irq));
83 .irq_mask = cpld_mask_irq,
84 .irq_ack = cpld_mask_irq,
85 .irq_unmask = cpld_unmask_irq,
97 status |= (ignore |
mask);
108 cpld_pic_cascade(
unsigned int irq,
struct irq_desc *
desc)
128 return cpld_pic_node ==
node;
132 cpld_pic_host_map(
struct irq_domain *
h,
unsigned int virq,
141 .match = cpld_pic_host_match,
142 .map = cpld_pic_host_map,
178 if (cascade_irq ==
NO_IRQ)
191 cpld_pic_node = of_node_get(np);
194 if (!cpld_pic_host) {
199 irq_set_chained_handler(cascade_irq, cpld_pic_cascade);