2 * Copyright (C) 1999 ARM Limited
3 * Copyright (C) 2000 Deep Blue Solutions Ltd
4 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
5 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <linux/kernel.h>
23 #include <linux/clk.h>
26 #include <mach/hardware.h>
27 #include <asm/proc-fns.h>
28 #include <asm/system.h>
31 * Put the CPU into idle mode. It is called by default_idle()
37 * This should do all the clock switching
38 * and wait for interrupt tricks.
43 #define WDOG_WCR_REG IO_ADDRESS(WDOG_BASE_ADDR)
44 #define WDOG_WCR_SRS (1 << 4)
47 * Reset the system. It is called by machine_restart().
49 void arch_reset(char mode)
53 clk = clk_get(NULL, "wdog_clk");
55 printk(KERN_ERR"Cannot activate the watchdog. Giving up\n");
61 /* Assert SRS signal */
62 __raw_writew(__raw_readw(WDOG_WCR_REG) & ~WDOG_WCR_SRS, WDOG_WCR_REG);