summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clocksource.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-05 12:06:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-05 12:24:04 +0200
commit797bc5d911282f7a80f6ba1acdf9bda36a1a70fa (patch)
tree905801b202e83051ec7ee62109aa79be44531808 /arch/arm/mach-imx/clocksource.c
parent83f87b14eb8e0f2551c183ec3299e9c02f2c38ae (diff)
downloadbarebox-797bc5d911282f7a80f6ba1acdf9bda36a1a70fa.tar.gz
barebox-797bc5d911282f7a80f6ba1acdf9bda36a1a70fa.tar.xz
ARM i.MX/watchdog: Make i.MX watchdog driver the reset source on i.MX
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/clocksource.c')
-rw-r--r--arch/arm/mach-imx/clocksource.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index 69a688c09d..e482fad624 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -179,40 +179,3 @@ static int imx_gpt_init(void)
return platform_driver_register(&imx_gpt_driver);
}
coredevice_initcall(imx_gpt_init);
-
-/*
- * Watchdog Registers
- */
-#ifdef CONFIG_ARCH_IMX1
-#define WDOG_WCR 0x00 /* Watchdog Control Register */
-#define WDOG_WSR 0x04 /* Watchdog Service Register */
-#define WDOG_WSTR 0x08 /* Watchdog Status Register */
-#define WDOG_WCR_WDE (1 << 0)
-#else
-#define WDOG_WCR 0x00 /* Watchdog Control Register */
-#define WDOG_WSR 0x02 /* Watchdog Service Register */
-#define WDOG_WSTR 0x04 /* Watchdog Status Register */
-#define WDOG_WCR_WDE (1 << 2)
-#endif
-
-/*
- * Reset the cpu by setting up the watchdog timer and let it time out
- */
-void __noreturn reset_cpu (unsigned long addr)
-{
- void __iomem *wdt = IOMEM(IMX_WDT_BASE);
-
- /* Disable watchdog and set Time-Out field to 0 */
- writew(0x0, wdt + WDOG_WCR);
-
- /* Write Service Sequence */
- writew(0x5555, wdt + WDOG_WSR);
- writew(0xaaaa, wdt + WDOG_WSR);
-
- /* Enable watchdog */
- writew(WDOG_WCR_WDE, wdt + WDOG_WCR);
-
- while (1);
- /*NOTREACHED*/
-}
-EXPORT_SYMBOL(reset_cpu);