summaryrefslogtreecommitdiff
path: root/arch/arm/mach-u300/include/mach/system.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-06-14 11:01:44 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-06-14 11:01:44 +0100
commitb7c11ec9f1c9f4272f032215ddb0b65d64b22ecc (patch)
treec65b81ef9ae5076d2137034accfa2610f45a13de /arch/arm/mach-u300/include/mach/system.h
parent06099961002a813324d057a91695af7c72939da6 (diff)
parent7666c17e2b0986a079da46122d8658544416c2cf (diff)
Merge branch 'u300' into devel
Conflicts: arch/arm/Makefile Updates: arch/arm/mach-u300/core.c arch/arm/mach-u300/timer.c
Diffstat (limited to 'arch/arm/mach-u300/include/mach/system.h')
-rw-r--r--arch/arm/mach-u300/include/mach/system.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
new file mode 100644
index 000000000000..8daf13634ce0
--- /dev/null
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -0,0 +1,42 @@
+/*
+ *
+ * arch/arm/mach-u300/include/mach/system.h
+ *
+ *
+ * Copyright (C) 2007-2009 ST-Ericsson AB
+ * License terms: GNU General Public License (GPL) version 2
+ * System shutdown and reset functions.
+ * Author: Linus Walleij <linus.walleij@stericsson.com>
+ */
+#include <mach/hardware.h>
+#include <asm/io.h>
+#include <asm/hardware/vic.h>
+#include <asm/irq.h>
+
+/* Forward declare this function from the watchdog */
+void coh901327_watchdog_reset(void);
+
+static inline void arch_idle(void)
+{
+ cpu_do_idle();
+}
+
+static void arch_reset(char mode, const char *cmd)
+{
+ switch (mode) {
+ case 's':
+ case 'h':
+ printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
+ /* Disable interrupts */
+ local_irq_disable();
+#ifdef CONFIG_COH901327_WATCHDOG
+ coh901327_watchdog_reset();
+#endif
+ break;
+ default:
+ /* Do nothing */
+ break;
+ }
+ /* Wait for system do die/reset. */
+ while (1);
+}