summaryrefslogtreecommitdiff
path: root/target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-05-13 12:03:59 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-05-13 12:03:59 +0000
commitd0ac4c1f0396906c755fb5cc81a729a611a2ca4d (patch)
treec998c548dde6b0c97290f82c3fe2744917f24fee /target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch
parent9cc9e8b608c51e5901cc1e314f1f4962b6618ee2 (diff)
downloadmtk-20170518-d0ac4c1f0396906c755fb5cc81a729a611a2ca4d.zip
mtk-20170518-d0ac4c1f0396906c755fb5cc81a729a611a2ca4d.tar.gz
mtk-20170518-d0ac4c1f0396906c755fb5cc81a729a611a2ca4d.tar.bz2
gemini: add support for 3.3
SVN-Revision: 31698
Diffstat (limited to 'target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch')
-rw-r--r--target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch b/target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch
new file mode 100644
index 0000000..faedfe0
--- /dev/null
+++ b/target/linux/gemini/patches-3.3/111-arm-gemini-add-watchdog-device.patch
@@ -0,0 +1,32 @@
+--- 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,5 +25,6 @@ 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);
+
+ #endif /* __GEMINI_COMMON_H__ */