diff options
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index cfa3ccf493bb..118d716f7832 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/r4kcache.h> | 29 | #include <asm/r4kcache.h> |
30 | #include <asm/txx9/generic.h> | 30 | #include <asm/txx9/generic.h> |
31 | #include <asm/txx9/pci.h> | 31 | #include <asm/txx9/pci.h> |
32 | #include <asm/txx9tmr.h> | ||
32 | #ifdef CONFIG_CPU_TX49XX | 33 | #ifdef CONFIG_CPU_TX49XX |
33 | #include <asm/txx9/tx4938.h> | 34 | #include <asm/txx9/tx4938.h> |
34 | #endif | 35 | #endif |
@@ -444,6 +445,20 @@ void __init txx9_wdt_init(unsigned long base) | |||
444 | platform_device_register_simple("txx9wdt", -1, &res, 1); | 445 | platform_device_register_simple("txx9wdt", -1, &res, 1); |
445 | } | 446 | } |
446 | 447 | ||
448 | void txx9_wdt_now(unsigned long base) | ||
449 | { | ||
450 | struct txx9_tmr_reg __iomem *tmrptr = | ||
451 | ioremap(base, sizeof(struct txx9_tmr_reg)); | ||
452 | /* disable watch dog timer */ | ||
453 | __raw_writel(TXx9_TMWTMR_WDIS | TXx9_TMWTMR_TWC, &tmrptr->wtmr); | ||
454 | __raw_writel(0, &tmrptr->tcr); | ||
455 | /* kick watchdog */ | ||
456 | __raw_writel(TXx9_TMWTMR_TWIE, &tmrptr->wtmr); | ||
457 | __raw_writel(1, &tmrptr->cpra); /* immediate */ | ||
458 | __raw_writel(TXx9_TMTCR_TCE | TXx9_TMTCR_CCDE | TXx9_TMTCR_TMODE_WDOG, | ||
459 | &tmrptr->tcr); | ||
460 | } | ||
461 | |||
447 | /* SPI support */ | 462 | /* SPI support */ |
448 | void __init txx9_spi_init(int busid, unsigned long base, int irq) | 463 | void __init txx9_spi_init(int busid, unsigned long base, int irq) |
449 | { | 464 | { |