13 #include <linux/kernel.h>
14 #include <linux/sched.h>
19 #include <asm/traps.h>
21 static unsigned long _icctrl_msc;
22 #define MSC01_IC_REG_BASE _icctrl_msc
24 #define MSCIC_WRITE(reg, data) do { *(volatile u32 *)(reg) = data; } while (0)
25 #define MSCIC_READ(reg, data) do { data = *(volatile u32 *)(reg); } while (0)
27 static unsigned int irq_base;
30 static inline void mask_msc_irq(
struct irq_data *
d)
34 if (irq < (irq_base + 32))
41 static inline void unmask_msc_irq(
struct irq_data *
d)
45 if (irq < (irq_base + 32))
54 static void level_mask_and_ack_msc_irq(
struct irq_data *d)
56 unsigned int irq = d->
irq;
68 static void edge_mask_and_ack_msc_irq(
struct irq_data *d)
70 unsigned int irq = d->
irq;
100 static void msc_bind_eic_interrupt(
int irq,
int set)
106 static struct irq_chip msc_levelirq_type = {
107 .name =
"SOC-it-Level",
108 .irq_ack = level_mask_and_ack_msc_irq,
109 .irq_mask = mask_msc_irq,
110 .irq_mask_ack = level_mask_and_ack_msc_irq,
111 .irq_unmask = unmask_msc_irq,
112 .irq_eoi = unmask_msc_irq,
115 static struct irq_chip msc_edgeirq_type = {
116 .name =
"SOC-it-Edge",
117 .irq_ack = edge_mask_and_ack_msc_irq,
118 .irq_mask = mask_msc_irq,
119 .irq_mask_ack = edge_mask_and_ack_msc_irq,
120 .irq_unmask = unmask_msc_irq,
121 .irq_eoi = unmask_msc_irq,
127 _icctrl_msc = (
unsigned long)
ioremap(icubase, 0x40000);
134 for (; nirq >= 0; nirq--, imp++) {