X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Fatheros%2Fpatches-3.18%2F130-watchdog.patch;fp=target%2Flinux%2Fatheros%2Fpatches-3.18%2F130-watchdog.patch;h=cec9e4212e729a8cb0d8a51493686e59ab7c98c5;hp=05e965d9c48200fe51d12b3c202c4a0967e9afbb;hb=729f0044ce4f3d717d2be2c1ec5c714c1940b161;hpb=49f6422f15dd79ef25c9f4bf250dc5984519e8c0 diff --git a/target/linux/atheros/patches-3.18/130-watchdog.patch b/target/linux/atheros/patches-3.18/130-watchdog.patch index 05e965d9c4..cec9e4212e 100644 --- a/target/linux/atheros/patches-3.18/130-watchdog.patch +++ b/target/linux/atheros/patches-3.18/130-watchdog.patch @@ -236,3 +236,42 @@ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o obj-$(CONFIG_OCTEON_WDT) += octeon-wdt.o octeon-wdt-y := octeon-wdt-main.o octeon-wdt-nmi.o +--- a/arch/mips/ath25/ar2315.c ++++ b/arch/mips/ath25/ar2315.c +@@ -225,6 +225,24 @@ static struct platform_device ar2315_gpi + .num_resources = ARRAY_SIZE(ar2315_gpio_res) + }; + ++static struct resource ar2315_wdt_res[] = { ++ { ++ .flags = IORESOURCE_MEM, ++ .start = AR2315_RST_BASE + AR2315_WDT_TIMER, ++ .end = AR2315_RST_BASE + AR2315_WDT_TIMER + 8 - 1, ++ }, ++ { ++ .flags = IORESOURCE_IRQ, ++ } ++}; ++ ++static struct platform_device ar2315_wdt = { ++ .id = 0, ++ .name = "ar2315-wdt", ++ .resource = ar2315_wdt_res, ++ .num_resources = ARRAY_SIZE(ar2315_wdt_res) ++}; ++ + static struct resource ar2315_spiflash_res[] = { + { + .name = "spiflash_read", +@@ -257,6 +275,11 @@ void __init ar2315_init_devices(void) + ar2315_gpio_res[1].end = ar2315_gpio_res[1].start; + platform_device_register(&ar2315_gpio); + ++ ar2315_wdt_res[1].start = irq_create_mapping(ar2315_misc_irq_domain, ++ AR2315_MISC_IRQ_WATCHDOG); ++ ar2315_wdt_res[1].end = ar2315_wdt_res[1].start; ++ platform_device_register(&ar2315_wdt); ++ + platform_device_register(&ar2315_spiflash); + + ar2315_eth_data.macaddr = ath25_board.config->enet0_mac;