aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/patches-3.18/111-arm-gemini-add-watchdog-device.patch
blob: 3f1f40dcca19328acaa33c1b68decd6c738a4ef2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
--- 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);
 
wrt.org/}{http://forum.openwrt.org/} \item IRC: \texttt{irc.freenode.net}, channels \texttt{\#openwrt} and \texttt{\#openwrt-devel} \item TRAC: \href{https://dev.openwrt.org/}{https://dev.openwrt.org/} the issue/bug/change tracking system \end{itemize} It is often best to document what you are doing before you do it. The process of documentation often exposes possible improvements. Keep your documentation up to date. \subsection{Patch Submission Process} \begin{enumerate} \item Use git or svn to create a patch. Creating patches manually with \textit{diff -urN} also works, but is usually unnecessary. \item Send a mail to openwrt-devel@lists.openwrt.org with the following contents: \begin{enumerate} \item \texttt{[PATCH] <short description>} in the Subject, followed by: \item (optional) a longer description of your patch in the message body \item \texttt{Signed-off-by: Your name <your@email.address>} \item Your actual patch, inline, not word wrapped or whitespace mangled. \end{enumerate} \item Please read \href{http://kerneltrap.org/Linux/Email\_Clients\_and\_Patches}{http://kerneltrap.org/Linux/Email\_Clients\_and\_Patches} to find out how to make sure your email client doesn't destroy your patch. \item Please use your real name and email address in the \texttt{Signed-off-by} line, following the same guidelines as in the \href{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/SubmittingPatches;h=681e2b36195c98ea5271b76383b3a574b190b04f;hb=HEAD}{Linux Kernel patch submission guidelines} \item Example of a properly formatted patch submission: \\ \href{http://lists.openwrt.org/pipermail/openwrt-devel/2007-November/001334.html}{http://lists.openwrt.org/pipermail/openwrt-devel/2007-November/001334.html} \end{enumerate}