diff options
Diffstat (limited to 'arch/mips/kernel/irq-msc01.c')
-rw-r--r-- | arch/mips/kernel/irq-msc01.c | 47 |
1 files changed, 10 insertions, 37 deletions
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c index 650a80ca3741..bcaad6696082 100644 --- a/arch/mips/kernel/irq-msc01.c +++ b/arch/mips/kernel/irq-msc01.c | |||
@@ -45,31 +45,6 @@ static inline void unmask_msc_irq(unsigned int irq) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Enables the IRQ on SOC-it | ||
49 | */ | ||
50 | static void enable_msc_irq(unsigned int irq) | ||
51 | { | ||
52 | unmask_msc_irq(irq); | ||
53 | } | ||
54 | |||
55 | /* | ||
56 | * Initialize the IRQ on SOC-it | ||
57 | */ | ||
58 | static unsigned int startup_msc_irq(unsigned int irq) | ||
59 | { | ||
60 | unmask_msc_irq(irq); | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | /* | ||
65 | * Disables the IRQ on SOC-it | ||
66 | */ | ||
67 | static void disable_msc_irq(unsigned int irq) | ||
68 | { | ||
69 | mask_msc_irq(irq); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * Masks and ACKs an IRQ | 48 | * Masks and ACKs an IRQ |
74 | */ | 49 | */ |
75 | static void level_mask_and_ack_msc_irq(unsigned int irq) | 50 | static void level_mask_and_ack_msc_irq(unsigned int irq) |
@@ -136,25 +111,23 @@ msc_bind_eic_interrupt (unsigned int irq, unsigned int set) | |||
136 | (irq<<MSC01_IC_RAMW_ADDR_SHF) | (set<<MSC01_IC_RAMW_DATA_SHF)); | 111 | (irq<<MSC01_IC_RAMW_ADDR_SHF) | (set<<MSC01_IC_RAMW_DATA_SHF)); |
137 | } | 112 | } |
138 | 113 | ||
139 | #define shutdown_msc_irq disable_msc_irq | ||
140 | |||
141 | struct irq_chip msc_levelirq_type = { | 114 | struct irq_chip msc_levelirq_type = { |
142 | .typename = "SOC-it-Level", | 115 | .typename = "SOC-it-Level", |
143 | .startup = startup_msc_irq, | ||
144 | .shutdown = shutdown_msc_irq, | ||
145 | .enable = enable_msc_irq, | ||
146 | .disable = disable_msc_irq, | ||
147 | .ack = level_mask_and_ack_msc_irq, | 116 | .ack = level_mask_and_ack_msc_irq, |
117 | .mask = mask_msc_irq, | ||
118 | .mask_ack = level_mask_and_ack_msc_irq, | ||
119 | .unmask = unmask_msc_irq, | ||
120 | .eoi = unmask_msc_irq, | ||
148 | .end = end_msc_irq, | 121 | .end = end_msc_irq, |
149 | }; | 122 | }; |
150 | 123 | ||
151 | struct irq_chip msc_edgeirq_type = { | 124 | struct irq_chip msc_edgeirq_type = { |
152 | .typename = "SOC-it-Edge", | 125 | .typename = "SOC-it-Edge", |
153 | .startup =startup_msc_irq, | ||
154 | .shutdown = shutdown_msc_irq, | ||
155 | .enable = enable_msc_irq, | ||
156 | .disable = disable_msc_irq, | ||
157 | .ack = edge_mask_and_ack_msc_irq, | 126 | .ack = edge_mask_and_ack_msc_irq, |
127 | .mask = mask_msc_irq, | ||
128 | .mask_ack = edge_mask_and_ack_msc_irq, | ||
129 | .unmask = unmask_msc_irq, | ||
130 | .eoi = unmask_msc_irq, | ||
158 | .end = end_msc_irq, | 131 | .end = end_msc_irq, |
159 | }; | 132 | }; |
160 | 133 | ||
@@ -175,14 +148,14 @@ void __init init_msc_irqs(unsigned int base, msc_irqmap_t *imp, int nirq) | |||
175 | 148 | ||
176 | switch (imp->im_type) { | 149 | switch (imp->im_type) { |
177 | case MSC01_IRQ_EDGE: | 150 | case MSC01_IRQ_EDGE: |
178 | irq_desc[base+n].chip = &msc_edgeirq_type; | 151 | set_irq_chip(base+n, &msc_edgeirq_type); |
179 | if (cpu_has_veic) | 152 | if (cpu_has_veic) |
180 | MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT); | 153 | MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT); |
181 | else | 154 | else |
182 | MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT | imp->im_lvl); | 155 | MSCIC_WRITE(MSC01_IC_SUP+n*8, MSC01_IC_SUP_EDGE_BIT | imp->im_lvl); |
183 | break; | 156 | break; |
184 | case MSC01_IRQ_LEVEL: | 157 | case MSC01_IRQ_LEVEL: |
185 | irq_desc[base+n].chip = &msc_levelirq_type; | 158 | set_irq_chip(base+n, &msc_levelirq_type); |
186 | if (cpu_has_veic) | 159 | if (cpu_has_veic) |
187 | MSCIC_WRITE(MSC01_IC_SUP+n*8, 0); | 160 | MSCIC_WRITE(MSC01_IC_SUP+n*8, 0); |
188 | else | 161 | else |