summaryrefslogtreecommitdiff
path: root/target/linux/atheros/patches-3.10/100-board.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-07-17 16:36:26 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-07-17 16:36:26 +0000
commitfceb7f70458f626d2cb8bfab82b4d2985376f544 (patch)
tree91c256b4db877469731aca62bb444782d490796f /target/linux/atheros/patches-3.10/100-board.patch
parent5c030111a9d57ce38efab652a24f8d242521ba99 (diff)
downloadmtk-20170518-fceb7f70458f626d2cb8bfab82b4d2985376f544.zip
mtk-20170518-fceb7f70458f626d2cb8bfab82b4d2985376f544.tar.gz
mtk-20170518-fceb7f70458f626d2cb8bfab82b4d2985376f544.tar.bz2
atheros: move AR2315 misc IRQ dispatching to separate function
Align code with AR5312 realization. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> SVN-Revision: 41692
Diffstat (limited to 'target/linux/atheros/patches-3.10/100-board.patch')
-rw-r--r--target/linux/atheros/patches-3.10/100-board.patch47
1 files changed, 26 insertions, 21 deletions
diff --git a/target/linux/atheros/patches-3.10/100-board.patch b/target/linux/atheros/patches-3.10/100-board.patch
index bc6d5d8..bf7e30c 100644
--- a/target/linux/atheros/patches-3.10/100-board.patch
+++ b/target/linux/atheros/patches-3.10/100-board.patch
@@ -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,6 +2222,28 @@
+ do_IRQ(AR531X_GPIO_IRQ_BASE + bit);
+}
+
++static void
++ar2315_misc_irq_dispatch(void)
++{
++ unsigned int misc_intr = ar231x_read_reg(AR2315_ISR) &
++ ar231x_read_reg(AR2315_IMR);
++
++ if (misc_intr & AR2315_ISR_SPI)
++ do_IRQ(AR531X_MISC_IRQ_SPI);
++ else if (misc_intr & AR2315_ISR_TIMER)
++ do_IRQ(AR531X_MISC_IRQ_TIMER);
++ else if (misc_intr & AR2315_ISR_AHB)
++ do_IRQ(AR531X_MISC_IRQ_AHB_PROC);
++ else if (misc_intr & AR2315_ISR_GPIO)
++ ar2315_gpio_irq();
++ else if (misc_intr & AR2315_ISR_UART0)
++ do_IRQ(AR531X_MISC_IRQ_UART0);
++ else if (misc_intr & AR2315_ISR_WD) {
++ ar231x_write_reg(AR2315_ISR, AR2315_ISR_WD);
++ do_IRQ(AR531X_MISC_IRQ_WATCHDOG);
++ } else
++ do_IRQ(AR531X_MISC_IRQ_NONE);
++}
+
+/*
+ * Called when an interrupt is received, this function
@@ -2240,26 +2262,9 @@
+ 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);
-+
-+ if (misc_intr & AR2315_ISR_SPI)
-+ do_IRQ(AR531X_MISC_IRQ_SPI);
-+ else if (misc_intr & AR2315_ISR_TIMER)
-+ do_IRQ(AR531X_MISC_IRQ_TIMER);
-+ else if (misc_intr & AR2315_ISR_AHB)
-+ do_IRQ(AR531X_MISC_IRQ_AHB_PROC);
-+ else if (misc_intr & AR2315_ISR_GPIO)
-+ ar2315_gpio_irq();
-+ else if (misc_intr & AR2315_ISR_UART0)
-+ do_IRQ(AR531X_MISC_IRQ_UART0);
-+ else if (misc_intr & AR2315_ISR_WD) {
-+ ar231x_write_reg(AR2315_ISR, AR2315_ISR_WD);
-+ do_IRQ(AR531X_MISC_IRQ_WATCHDOG);
-+ } else
-+ do_IRQ(AR531X_MISC_IRQ_NONE);
-+ } else if (pending & CAUSEF_IP7)
++ else if (pending & CAUSEF_IP2)
++ ar2315_misc_irq_dispatch();
++ else if (pending & CAUSEF_IP7)
+ do_IRQ(AR531X_IRQ_CPU_CLOCK);
+}
+