summaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup.c
diff options
context:
space:
mode:
authorAtsushi Nemoto2008-07-23 17:25:18 +0200
committerRalf Baechle2008-07-30 22:54:39 +0200
commit683147254ef7e69ebbbe55280ba6a3c5ae2325d8 (patch)
tree4f242b09bcd54ab4563e9c6201dc0c8ded351fdc /arch/mips/txx9/generic/setup.c
parent[MIPS] TXx9: Cleanup restart/halt/power_off (diff)
downloadkernel-qcow2-linux-683147254ef7e69ebbbe55280ba6a3c5ae2325d8.tar.gz
kernel-qcow2-linux-683147254ef7e69ebbbe55280ba6a3c5ae2325d8.tar.xz
kernel-qcow2-linux-683147254ef7e69ebbbe55280ba6a3c5ae2325d8.zip
[MIPS] TXx9: Cleanup watchdog
Unify registration of txx9wdt platform device. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r--arch/mips/txx9/generic/setup.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 82272e85a042..7b5705d18deb 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -20,6 +20,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/gpio.h>
+#include <linux/platform_device.h>
#include <asm/bootinfo.h>
#include <asm/time.h>
#include <asm/reboot.h>
@@ -208,6 +209,17 @@ static void __noreturn txx9_machine_halt(void)
}
}
+/* Watchdog support */
+void __init txx9_wdt_init(unsigned long base)
+{
+ struct resource res = {
+ .start = base,
+ .end = base + 0x100 - 1,
+ .flags = IORESOURCE_MEM,
+ };
+ platform_device_register_simple("txx9wdt", -1, &res, 1);
+}
+
/* wrappers */
void __init plat_mem_setup(void)
{