atheros[ar2315-wdt]: update interrupt handling
[openwrt/openwrt.git] / target / linux / atheros / patches-3.10 / 130-watchdog.patch
index 5dd0e75842bc78e4dfba195486dab4395c6e52e9..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) {
 +MODULE_ALIAS("platform:" DRIVER_NAME);
 --- a/drivers/watchdog/Kconfig
 +++ b/drivers/watchdog/Kconfig
-@@ -1113,6 +1113,12 @@ config LANTIQ_WDT
+@@ -1113,6 +1113,13 @@ config LANTIQ_WDT
        help
          Hardware driver for the Lantiq SoC Watchdog Timer.
  
-+config ATHEROS_WDT
-+      tristate "Atheros wisoc Watchdog Timer"
++config AR2315_WDT
++      tristate "Atheros AR2315+ WiSoCs Watchdog Timer"
 +      depends on ATHEROS_AR231X
 +      help
-+        Hardware driver for the Atheros wisoc Watchdog Timer.
++        Hardware driver for the built-in watchdog timer on the Atheros
++        AR2315/AR2316 WiSoCs.
 +
  # PARISC Architecture
  
  obj-$(CONFIG_PNX833X_WDT) += pnx833x_wdt.o
  obj-$(CONFIG_SIBYTE_WDOG) += sb_wdog.o
  obj-$(CONFIG_AR7_WDT) += ar7_wdt.o
-+obj-$(CONFIG_ATHEROS_WDT) += ar2315-wtd.o
++obj-$(CONFIG_AR2315_WDT) += ar2315-wtd.o
  obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
  obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o
  octeon-wdt-y := octeon-wdt-main.o octeon-wdt-nmi.o