aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-03-26 20:36:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-03-26 20:36:30 +0000
commita304f3d2b6605e237d4ad080feb51d53bbb82b19 (patch)
tree9b9b0ddcc821be5e39df31276f1757133276d919 /target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch
parent8ef68a20051f33d238e5cbcce95753b05bf79780 (diff)
downloadupstream-a304f3d2b6605e237d4ad080feb51d53bbb82b19.tar.gz
upstream-a304f3d2b6605e237d4ad080feb51d53bbb82b19.tar.bz2
upstream-a304f3d2b6605e237d4ad080feb51d53bbb82b19.zip
gemini: add 3.18 support
Signed-off-by: Roman Yeryomin <roman@advem.lv> SVN-Revision: 45033
Diffstat (limited to 'target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch')
-rw-r--r--target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch b/target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch
new file mode 100644
index 0000000000..3f1f40dcca
--- /dev/null
+++ b/target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch
@@ -0,0 +1,33 @@
+--- a/arch/arm/mach-gemini/devices.c
++++ b/arch/arm/mach-gemini/devices.c
+@@ -117,3 +117,20 @@ int __init platform_register_rtc(void)
+ return platform_device_register(&gemini_rtc_device);
+ }
+
++static struct resource wdt_resource = {
++ .start = GEMINI_WAQTCHDOG_BASE,
++ .end = GEMINI_WAQTCHDOG_BASE + 0x18,
++ .flags = IORESOURCE_MEM,
++};
++
++static struct platform_device wdt_device = {
++ .name = "gemini-wdt",
++ .id = 0,
++ .resource = &wdt_resource,
++ .num_resources = 1,
++};
++
++int __init platform_register_watchdog(void)
++{
++ return platform_device_register(&wdt_device);
++}
+--- a/arch/arm/mach-gemini/common.h
++++ b/arch/arm/mach-gemini/common.h
+@@ -25,6 +25,7 @@ extern int platform_register_uart(void);
+ extern int platform_register_pflash(unsigned int size,
+ struct mtd_partition *parts,
+ unsigned int nr_parts);
++extern int platform_register_watchdog(void);
+
+ extern void gemini_restart(enum reboot_mode mode, const char *cmd);
+