diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-01-04 15:28:20 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-01-18 13:30:26 -0500 |
commit | 858f763c1cc37ecc6ab39dec60bb3a46606dcac4 (patch) | |
tree | 0b0d834212fa05e53de9988ba5ea83c224302a1f | |
parent | d8fec1fc80cd8639449e2b5012688f5be109eeaf (diff) |
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>
-rw-r--r-- | arch/mips/ath79/dev-common.c | 10 | ||||
-rw-r--r-- | arch/mips/ath79/dev-common.h | 1 | ||||
-rw-r--r-- | arch/mips/ath79/setup.c | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c index 3cfa10065d68..3b82e325bebf 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) | |||
65 | ath79_uart_data[0].uartclk = clk_get_rate(clk); | 65 | ath79_uart_data[0].uartclk = clk_get_rate(clk); |
66 | platform_device_register(&ath79_uart_device); | 66 | platform_device_register(&ath79_uart_device); |
67 | } | 67 | } |
68 | |||
69 | static struct platform_device ath79_wdt_device = { | ||
70 | .name = "ath79-wdt", | ||
71 | .id = -1, | ||
72 | }; | ||
73 | |||
74 | void __init ath79_register_wdt(void) | ||
75 | { | ||
76 | platform_device_register(&ath79_wdt_device); | ||
77 | } | ||
diff --git a/arch/mips/ath79/dev-common.h b/arch/mips/ath79/dev-common.h index 248622cc7cd6..0f514e1affce 100644 --- a/arch/mips/ath79/dev-common.h +++ b/arch/mips/ath79/dev-common.h | |||
@@ -13,5 +13,6 @@ | |||
13 | #define _ATH79_DEV_COMMON_H | 13 | #define _ATH79_DEV_COMMON_H |
14 | 14 | ||
15 | void ath79_register_uart(void); | 15 | void ath79_register_uart(void); |
16 | void ath79_register_wdt(void); | ||
16 | 17 | ||
17 | #endif /* _ATH79_DEV_COMMON_H */ | 18 | #endif /* _ATH79_DEV_COMMON_H */ |
diff --git a/arch/mips/ath79/setup.c b/arch/mips/ath79/setup.c index 5e5740298709..159b42f106b0 100644 --- a/arch/mips/ath79/setup.c +++ b/arch/mips/ath79/setup.c | |||
@@ -186,6 +186,7 @@ static int __init ath79_setup(void) | |||
186 | { | 186 | { |
187 | ath79_gpio_init(); | 187 | ath79_gpio_init(); |
188 | ath79_register_uart(); | 188 | ath79_register_uart(); |
189 | ath79_register_wdt(); | ||
189 | 190 | ||
190 | mips_machine_setup(); | 191 | mips_machine_setup(); |
191 | 192 | ||