12 #include <linux/module.h>
15 #include <linux/device.h>
16 #include <linux/errno.h>
22 #include <asm/exception.h>
24 #include <mach/hardware.h>
25 #include <mach/common.h>
26 #include <mach/irqs.h>
36 #define TZIC_INTCNTL 0x0000
37 #define TZIC_INTTYPE 0x0004
38 #define TZIC_IMPID 0x0008
39 #define TZIC_PRIOMASK 0x000C
40 #define TZIC_SYNCCTRL 0x0010
41 #define TZIC_DSMINT 0x0014
42 #define TZIC_INTSEC0(i) (0x0080 + ((i) << 2))
43 #define TZIC_ENSET0(i) (0x0100 + ((i) << 2))
44 #define TZIC_ENCLEAR0(i) (0x0180 + ((i) << 2))
45 #define TZIC_SRCSET0 0x0200
46 #define TZIC_SRCCLAR0 0x0280
47 #define TZIC_PRIORITY0 0x0400
48 #define TZIC_PND0 0x0D00
49 #define TZIC_HIPND(i) (0x0D80+ ((i) << 2))
50 #define TZIC_WAKEUP0(i) (0x0E00 + ((i) << 2))
51 #define TZIC_SWINT 0x0F00
52 #define TZIC_ID0 0x0FD0
57 #define TZIC_NUM_IRQS 128
67 mask = 1
U << (irq & 0x1F);
77 #define tzic_set_irq_fiq NULL
83 struct irq_chip_generic *
gc = irq_data_get_irq_chip_data(d);
98 #define tzic_irq_suspend NULL
99 #define tzic_irq_resume NULL
108 static __init void tzic_init_gc(
int idx,
unsigned int irq_start)
110 struct irq_chip_generic *
gc;
111 struct irq_chip_type *
ct;
115 gc->private = &tzic_extra_irq;
116 gc->wake_enabled = IRQ_MSK(32);
133 int i, irqofs, handled;
138 for (i = 0; i < 4; i++) {
144 irqofs = fls(stat) - 1;
146 irqofs + i * 32), regs);
147 stat &= ~(1 << irqofs);
174 for (i = 0; i < 4; i++)
178 for (i = 0; i < 4; i++)
191 for (i = 0; i < 4; i++, irq_base += 32)
192 tzic_init_gc(i, irq_base);
199 pr_info(
"TrustZone Interrupt Controller (TZIC) initialized\n");
219 for (i = 0; i < 4; i++)