aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/txx9/generic')
-rw-r--r--arch/mips/txx9/generic/setup.c12
-rw-r--r--arch/mips/txx9/generic/setup_tx4927.c7
-rw-r--r--arch/mips/txx9/generic/setup_tx4938.c7
3 files changed, 24 insertions, 2 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 @@
20#include <linux/clk.h> 20#include <linux/clk.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <linux/platform_device.h>
23#include <asm/bootinfo.h> 24#include <asm/bootinfo.h>
24#include <asm/time.h> 25#include <asm/time.h>
25#include <asm/reboot.h> 26#include <asm/reboot.h>
@@ -208,6 +209,17 @@ static void __noreturn txx9_machine_halt(void)
208 } 209 }
209} 210}
210 211
212/* Watchdog support */
213void __init txx9_wdt_init(unsigned long base)
214{
215 struct resource res = {
216 .start = base,
217 .end = base + 0x100 - 1,
218 .flags = IORESOURCE_MEM,
219 };
220 platform_device_register_simple("txx9wdt", -1, &res, 1);
221}
222
211/* wrappers */ 223/* wrappers */
212void __init plat_mem_setup(void) 224void __init plat_mem_setup(void)
213{ 225{
diff --git a/arch/mips/txx9/generic/setup_tx4927.c b/arch/mips/txx9/generic/setup_tx4927.c
index 89d6e28add93..b42c85573d0d 100644
--- a/arch/mips/txx9/generic/setup_tx4927.c
+++ b/arch/mips/txx9/generic/setup_tx4927.c
@@ -21,7 +21,7 @@
21#include <asm/txx9/generic.h> 21#include <asm/txx9/generic.h>
22#include <asm/txx9/tx4927.h> 22#include <asm/txx9/tx4927.h>
23 23
24void __init tx4927_wdr_init(void) 24static void __init tx4927_wdr_init(void)
25{ 25{
26 /* clear WatchDogReset (W1C) */ 26 /* clear WatchDogReset (W1C) */
27 tx4927_ccfg_set(TX4927_CCFG_WDRST); 27 tx4927_ccfg_set(TX4927_CCFG_WDRST);
@@ -29,6 +29,11 @@ void __init tx4927_wdr_init(void)
29 tx4927_ccfg_set(TX4927_CCFG_WR); 29 tx4927_ccfg_set(TX4927_CCFG_WR);
30} 30}
31 31
32void __init tx4927_wdt_init(void)
33{
34 txx9_wdt_init(TX4927_TMR_REG(2) & 0xfffffffffULL);
35}
36
32static struct resource tx4927_sdram_resource[4]; 37static struct resource tx4927_sdram_resource[4];
33 38
34void __init tx4927_setup(void) 39void __init tx4927_setup(void)
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c
index 317378d8579d..b0a3dc8863fd 100644
--- a/arch/mips/txx9/generic/setup_tx4938.c
+++ b/arch/mips/txx9/generic/setup_tx4938.c
@@ -21,7 +21,7 @@
21#include <asm/txx9/generic.h> 21#include <asm/txx9/generic.h>
22#include <asm/txx9/tx4938.h> 22#include <asm/txx9/tx4938.h>
23 23
24void __init tx4938_wdr_init(void) 24static void __init tx4938_wdr_init(void)
25{ 25{
26 /* clear WatchDogReset (W1C) */ 26 /* clear WatchDogReset (W1C) */
27 tx4938_ccfg_set(TX4938_CCFG_WDRST); 27 tx4938_ccfg_set(TX4938_CCFG_WDRST);
@@ -29,6 +29,11 @@ void __init tx4938_wdr_init(void)
29 tx4938_ccfg_set(TX4938_CCFG_WR); 29 tx4938_ccfg_set(TX4938_CCFG_WR);
30} 30}
31 31
32void __init tx4938_wdt_init(void)
33{
34 txx9_wdt_init(TX4938_TMR_REG(2) & 0xfffffffffULL);
35}
36
32static struct resource tx4938_sdram_resource[4]; 37static struct resource tx4938_sdram_resource[4];
33static struct resource tx4938_sram_resource; 38static struct resource tx4938_sram_resource;
34 39