summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-01-04 21:28:20 +0100
committerRalf Baechle <ralf@linux-mips.org>2011-01-18 19:30:26 +0100
commit858f763c1cc37ecc6ab39dec60bb3a46606dcac4 (patch)
tree0b0d834212fa05e53de9988ba5ea83c224302a1f /arch
parentd8fec1fc80cd8639449e2b5012688f5be109eeaf (diff)
downloadlinux-0-day-858f763c1cc37ecc6ab39dec60bb3a46606dcac4.tar.gz
linux-0-day-858f763c1cc37ecc6ab39dec60bb3a46606dcac4.tar.xz
MIPS: ath79: add common watchdog device
All supported SoCs have a built-in hardware watchdog driver. This patch registers a platform_device for that to make it usable. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Cc: linux-mips@linux-mips.org Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Cc: Cliff Holden <Cliff.Holden@Atheros.com> Cc: Kathy Giori <Kathy.Giori@Atheros.com> Patchwork: https://patchwork.linux-mips.org/patch/1955/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/ath79/dev-common.c10
-rw-r--r--arch/mips/ath79/dev-common.h1
-rw-r--r--arch/mips/ath79/setup.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c
index 3cfa10065d681..3b82e325bebfb 100644
--- a/arch/mips/ath79/dev-common.c
+++ b/arch/mips/ath79/dev-common.c
@@ -65,3 +65,13 @@ void __init ath79_register_uart(void)
ath79_uart_data[0].uartclk = clk_get_rate(clk);
platform_device_register(&ath79_uart_device);
}
+
+static struct platform_device ath79_wdt_device = {
+ .name = "ath79-wdt",
+ .id = -1,
+};
+
+void __init ath79_register_wdt(void)
+{
+ platform_device_register(&ath79_wdt_device);
+}
diff --git a/arch/mips/ath79/dev-common.h b/arch/mips/ath79/dev-common.h
index 248622cc7cd63..0f514e1affcec 100644
--- a/arch/mips/ath79/dev-common.h
+++ b/arch/mips/ath79/dev-common.h
@@ -13,5 +13,6 @@
#define _ATH79_DEV_COMMON_H
void ath79_register_uart(void);
+void ath79_register_wdt(void);
#endif /* _ATH79_DEV_COMMON_H */
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c
index 5e57402987090..159b42f106b09 100644
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -186,6 +186,7 @@ static int __init ath79_setup(void)
{
ath79_gpio_init();
ath79_register_uart();
+ ath79_register_wdt();
mips_machine_setup();