|
|
|
@ -2154,7 +2154,7 @@ |
|
|
|
|
+
|
|
|
|
|
--- /dev/null
|
|
|
|
|
+++ b/arch/mips/ar231x/ar2315.c
|
|
|
|
|
@@ -0,0 +1,656 @@
|
|
|
|
|
@@ -0,0 +1,661 @@
|
|
|
|
|
+/*
|
|
|
|
|
+ * This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
|
+ * License. See the file "COPYING" in the main directory of this archive
|
|
|
|
@ -2222,25 +2222,9 @@ |
|
|
|
|
+ do_IRQ(AR531X_GPIO_IRQ_BASE + bit);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/*
|
|
|
|
|
+ * Called when an interrupt is received, this function
|
|
|
|
|
+ * determines exactly which interrupt it was, and it
|
|
|
|
|
+ * invokes the appropriate handler.
|
|
|
|
|
+ *
|
|
|
|
|
+ * Implicitly, we also define interrupt priority by
|
|
|
|
|
+ * choosing which to dispatch first.
|
|
|
|
|
+ */
|
|
|
|
|
+static asmlinkage void
|
|
|
|
|
+ar2315_irq_dispatch(void)
|
|
|
|
|
+static void
|
|
|
|
|
+ar2315_misc_irq_dispatch(void)
|
|
|
|
|
+{
|
|
|
|
|
+ int pending = read_c0_status() & read_c0_cause();
|
|
|
|
|
+
|
|
|
|
|
+ if (pending & CAUSEF_IP3)
|
|
|
|
|
+ do_IRQ(AR2315_IRQ_WLAN0_INTRS);
|
|
|
|
|
+ else if (pending & CAUSEF_IP4)
|
|
|
|
|
+ do_IRQ(AR2315_IRQ_ENET0_INTRS);
|
|
|
|
|
+ else if (pending & CAUSEF_IP2) {
|
|
|
|
|
+ unsigned int misc_intr = ar231x_read_reg(AR2315_ISR) &
|
|
|
|
|
+ ar231x_read_reg(AR2315_IMR);
|
|
|
|
|
+
|
|
|
|
@ -2259,7 +2243,28 @@ |
|
|
|
|
+ do_IRQ(AR531X_MISC_IRQ_WATCHDOG);
|
|
|
|
|
+ } else
|
|
|
|
|
+ do_IRQ(AR531X_MISC_IRQ_NONE);
|
|
|
|
|
+ } else if (pending & CAUSEF_IP7)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/*
|
|
|
|
|
+ * Called when an interrupt is received, this function
|
|
|
|
|
+ * determines exactly which interrupt it was, and it
|
|
|
|
|
+ * invokes the appropriate handler.
|
|
|
|
|
+ *
|
|
|
|
|
+ * Implicitly, we also define interrupt priority by
|
|
|
|
|
+ * choosing which to dispatch first.
|
|
|
|
|
+ */
|
|
|
|
|
+static asmlinkage void
|
|
|
|
|
+ar2315_irq_dispatch(void)
|
|
|
|
|
+{
|
|
|
|
|
+ int pending = read_c0_status() & read_c0_cause();
|
|
|
|
|
+
|
|
|
|
|
+ if (pending & CAUSEF_IP3)
|
|
|
|
|
+ do_IRQ(AR2315_IRQ_WLAN0_INTRS);
|
|
|
|
|
+ else if (pending & CAUSEF_IP4)
|
|
|
|
|
+ do_IRQ(AR2315_IRQ_ENET0_INTRS);
|
|
|
|
|
+ else if (pending & CAUSEF_IP2)
|
|
|
|
|
+ ar2315_misc_irq_dispatch();
|
|
|
|
|
+ else if (pending & CAUSEF_IP7)
|
|
|
|
|
+ do_IRQ(AR531X_IRQ_CPU_CLOCK);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|