atheros[ar2315-wdt]: update interrupt handling
authorFelix Fietkau <nbd@openwrt.org>
Thu, 17 Jul 2014 16:36:10 +0000 (16:36 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 17 Jul 2014 16:36:10 +0000 (16:36 +0000)
Acknowledge watchdog interrupt in arch irq dispatcher and remove odd
watchdog enable call from probe function.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
SVN-Revision: 41687

target/linux/atheros/patches-3.10/100-board.patch
target/linux/atheros/patches-3.10/130-watchdog.patch

index 02ab9432d4279e59ab2230a2fa970d979b62799a..316982753c448a7a0d9a36e947f4b6c58f3c8f6f 100644 (file)
 +
 --- /dev/null
 +++ b/arch/mips/ar231x/ar2315.c
-@@ -0,0 +1,623 @@
+@@ -0,0 +1,624 @@
 +/*
 + * 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
 +                      ar2315_gpio_irq();
 +              else if (misc_intr & AR2315_ISR_UART0)
 +                      do_IRQ(AR531X_MISC_IRQ_UART0);
-+              else if (misc_intr & AR2315_ISR_WD)
++              else if (misc_intr & AR2315_ISR_WD) {
++                      ar231x_write_reg(AR2315_ISR, AR2315_ISR_WD);
 +                      do_IRQ(AR531X_MISC_IRQ_WATCHDOG);
-+              else
++              else
 +                      do_IRQ(AR531X_MISC_IRQ_NONE);
 +      } else if (pending & CAUSEF_IP7)
 +              do_IRQ(AR531X_IRQ_CPU_CLOCK);
index b0284e738d24f0cb225cdeb1f28a1b1056023efc..06c8d44a45d791f5754e05d69f6b1a7be20d43d4 100644 (file)
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/drivers/watchdog/ar2315-wtd.c
-@@ -0,0 +1,189 @@
+@@ -0,0 +1,186 @@
 +/*
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
@@ -52,7 +52,6 @@
 +ar2315_wdt_enable(void)
 +{
 +      ar231x_write_reg(AR2315_WD, wdt_timeout * CLOCK_RATE);
-+      ar231x_write_reg(AR2315_ISR, 0x80);
 +}
 +
 +static ssize_t
@@ -92,7 +91,6 @@
 +      } else {
 +              ar231x_write_reg(AR2315_WDC, 0);
 +              ar231x_write_reg(AR2315_WD, 0);
-+              ar231x_write_reg(AR2315_ISR, 0x80);
 +      }
 +      return IRQ_HANDLED;
 +}
 +{
 +      int ret = 0;
 +
-+      ar2315_wdt_enable();
 +      ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt,
 +                        IRQF_DISABLED, DRIVER_NAME, dev);
 +      if (ret) {