15 #include <linux/kernel.h>
27 static void (*ath79_ip2_handler)(
void);
28 static void (*ath79_ip3_handler)(
void);
30 static void ath79_misc_irq_handler(
unsigned int irq,
struct irq_desc *
desc)
78 static void ar71xx_misc_irq_unmask(
struct irq_data *
d)
91 static void ar71xx_misc_irq_mask(
struct irq_data *d)
104 static void ar724x_misc_irq_ack(
struct irq_data *d)
117 static struct irq_chip ath79_misc_irq_chip = {
119 .irq_unmask = ar71xx_misc_irq_unmask,
120 .irq_mask = ar71xx_misc_irq_mask,
123 static void __init ath79_misc_irq_init(
void)
131 if (soc_is_ar71xx() || soc_is_ar913x())
132 ath79_misc_irq_chip.
irq_mask_ack = ar71xx_misc_irq_mask;
133 else if (soc_is_ar724x() || soc_is_ar933x() || soc_is_ar934x())
134 ath79_misc_irq_chip.
irq_ack = ar724x_misc_irq_ack;
140 irq_set_chip_and_handler(i, &ath79_misc_irq_chip,
147 static void ar934x_ip2_irq_dispatch(
unsigned int irq,
struct irq_desc *desc)
168 static void ar934x_ip2_irq_init(
void)
182 unsigned long pending;
215 static void ar71xx_ip2_handler(
void)
221 static void ar724x_ip2_handler(
void)
227 static void ar913x_ip2_handler(
void)
233 static void ar933x_ip2_handler(
void)
239 static void ar934x_ip2_handler(
void)
244 static void ar71xx_ip3_handler(
void)
250 static void ar724x_ip3_handler(
void)
256 static void ar913x_ip3_handler(
void)
262 static void ar933x_ip3_handler(
void)
268 static void ar934x_ip3_handler(
void)
276 if (soc_is_ar71xx()) {
277 ath79_ip2_handler = ar71xx_ip2_handler;
278 ath79_ip3_handler = ar71xx_ip3_handler;
279 }
else if (soc_is_ar724x()) {
280 ath79_ip2_handler = ar724x_ip2_handler;
281 ath79_ip3_handler = ar724x_ip3_handler;
282 }
else if (soc_is_ar913x()) {
283 ath79_ip2_handler = ar913x_ip2_handler;
284 ath79_ip3_handler = ar913x_ip3_handler;
285 }
else if (soc_is_ar933x()) {
286 ath79_ip2_handler = ar933x_ip2_handler;
287 ath79_ip3_handler = ar933x_ip3_handler;
288 }
else if (soc_is_ar934x()) {
289 ath79_ip2_handler = ar934x_ip2_handler;
290 ath79_ip3_handler = ar934x_ip3_handler;
297 ath79_misc_irq_init();
300 ar934x_ip2_irq_init();