16 #include <linux/export.h>
26 unsigned long suspend_ipr;
27 unsigned long saved_ipr[64];
37 static void intc_mask_irq(
struct irq_data *
d)
42 static void intc_unmask_irq(
struct irq_data *
d)
47 static struct intc intc0 = {
50 .irq_mask = intc_mask_irq,
51 .irq_unmask = intc_unmask_irq,
62 unsigned long status_reg;
66 old_regs = set_irq_regs(regs);
70 irq =
intc_readl(&intc0, INTCAUSE0 - 4 * level);
86 set_irq_regs(old_regs);
91 extern void _evba(
void);
92 extern void irq_level0(
void);
114 (
unsigned long)regs->
start);
124 offset = (
unsigned long)&irq_level0 - (
unsigned long)&_evba;
127 readback =
intc_readl(&intc0, INTPR0 + 4 * i);
128 if (readback == offset)
129 irq_set_chip_and_handler(i, &intc0.
chip,
140 panic(
"Interrupt controller initialization failed!\n");
146 intc0.suspend_ipr =
offset;
154 pr_err(
"intc_suspend: called with interrupts enabled\n");
159 pr_err(
"intc_suspend: suspend_ipr not initialized\n");
163 for (i = 0; i < 64; i++) {
164 intc0.saved_ipr[
i] =
intc_readl(&intc0, INTPR0 + 4 * i);
165 intc_writel(&intc0, INTPR0 + 4 * i, intc0.suspend_ipr);
175 for (i = 0; i < 64; i++)
176 intc_writel(&intc0, INTPR0 + 4 * i, intc0.saved_ipr[i]);
179 #define intc_suspend NULL
180 #define intc_resume NULL
188 static int __init intc_init_syscore(
void)
198 return intc_readl(&intc0, INTREQ0 + 4 * group);