17 #include <linux/module.h>
18 #include <linux/sched.h>
20 #include <linux/ptrace.h>
25 #include <mach/hardware.h>
29 #define VIC_REG(off) (MSM_VIC_BASE + (off))
31 #define VIC_INT_SELECT0 VIC_REG(0x0000)
32 #define VIC_INT_SELECT1 VIC_REG(0x0004)
33 #define VIC_INT_EN0 VIC_REG(0x0010)
34 #define VIC_INT_EN1 VIC_REG(0x0014)
35 #define VIC_INT_ENCLEAR0 VIC_REG(0x0020)
36 #define VIC_INT_ENCLEAR1 VIC_REG(0x0024)
37 #define VIC_INT_ENSET0 VIC_REG(0x0030)
38 #define VIC_INT_ENSET1 VIC_REG(0x0034)
39 #define VIC_INT_TYPE0 VIC_REG(0x0040)
40 #define VIC_INT_TYPE1 VIC_REG(0x0044)
41 #define VIC_INT_POLARITY0 VIC_REG(0x0050)
42 #define VIC_INT_POLARITY1 VIC_REG(0x0054)
43 #define VIC_NO_PEND_VAL VIC_REG(0x0060)
44 #define VIC_INT_MASTEREN VIC_REG(0x0064)
45 #define VIC_PROTECTION VIC_REG(0x006C)
46 #define VIC_CONFIG VIC_REG(0x0068)
47 #define VIC_IRQ_STATUS0 VIC_REG(0x0080)
48 #define VIC_IRQ_STATUS1 VIC_REG(0x0084)
49 #define VIC_FIQ_STATUS0 VIC_REG(0x0090)
50 #define VIC_FIQ_STATUS1 VIC_REG(0x0094)
51 #define VIC_RAW_STATUS0 VIC_REG(0x00A0)
52 #define VIC_RAW_STATUS1 VIC_REG(0x00A4)
53 #define VIC_INT_CLEAR0 VIC_REG(0x00B0)
54 #define VIC_INT_CLEAR1 VIC_REG(0x00B4)
55 #define VIC_SOFTINT0 VIC_REG(0x00C0)
56 #define VIC_SOFTINT1 VIC_REG(0x00C4)
57 #define VIC_IRQ_VEC_RD VIC_REG(0x00D0)
58 #define VIC_IRQ_VEC_PEND_RD VIC_REG(0x00D4)
59 #define VIC_IRQ_VEC_WR VIC_REG(0x00D8)
60 #define VIC_IRQ_IN_SERVICE VIC_REG(0x00E0)
61 #define VIC_IRQ_IN_STACK VIC_REG(0x00E4)
62 #define VIC_TEST_BUS_SEL VIC_REG(0x00E8)
64 #define VIC_VECTPRIORITY(n) VIC_REG(0x0200+((n) * 4))
65 #define VIC_VECTADDR(n) VIC_REG(0x0400+((n) * 4))
67 static void msm_irq_ack(
struct irq_data *
d)
73 static void msm_irq_mask(
struct irq_data *
d)
79 static void msm_irq_unmask(
struct irq_data *
d)
85 static int msm_irq_set_wake(
struct irq_data *
d,
unsigned int on)
90 static int msm_irq_set_type(
struct irq_data *
d,
unsigned int flow_type)
94 int b = 1 << (
d->irq & 31);
112 static struct irq_chip msm_irq_chip = {
114 .irq_ack = msm_irq_ack,
115 .irq_mask = msm_irq_mask,
116 .irq_unmask = msm_irq_unmask,
117 .irq_set_wake = msm_irq_set_wake,
118 .irq_set_type = msm_irq_set_type,