summaryrefslogtreecommitdiff
path: root/arch/arm/plat-tcc/system.c
diff options
context:
space:
mode:
authorHans J. Koch <hjk@linutronix.de>2010-09-17 20:13:56 +0400
committerThomas Gleixner <tglx@linutronix.de>2010-09-17 23:55:07 +0400
commit83ef3338a2ae5d5bd9f5f6803b900b8067660054 (patch)
treea759da3a601d092889321cf49b9f003726147be1 /arch/arm/plat-tcc/system.c
parent509344b8b4d365b7ff3bce97198d83a57b7c3f31 (diff)
downloadlinux-83ef3338a2ae5d5bd9f5f6803b900b8067660054.tar.xz
ARM: Introduce plat-tcc
This patch introduces support for the tcc platform by creating an arch/arm/plat-tcc and arch/arm/mach-tcc8k directories and adding basic include files plus Kconfig and Makefile. Signed-off-by: "Hans J. Koch" <hjk@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm/plat-tcc/system.c')
-rw-r--r--arch/arm/plat-tcc/system.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/plat-tcc/system.c b/arch/arm/plat-tcc/system.c
new file mode 100644
index 000000000000..cc208fae3e7a
--- /dev/null
+++ b/arch/arm/plat-tcc/system.c
@@ -0,0 +1,25 @@
+/*
+ * System functions for Telechips TCCxxxx SoCs
+ *
+ * Copyright (C) Hans J. Koch <hjk@linutronix.de>
+ *
+ * Licensed under the terms of the GPL v2.
+ *
+ */
+
+#include <linux/io.h>
+
+#include <mach/tcc8k-regs.h>
+
+/* System reboot */
+void plat_tcc_reboot(void)
+{
+ /* Make sure clocks are on */
+ __raw_writel(0xffffffff, CKC_BASE + BCLKCTR0_OFFS);
+
+ /* Enable watchdog reset */
+ __raw_writel(0x49, TIMER_BASE + TWDCFG_OFFS);
+ /* Wait for reset */
+ while(1)
+ ;
+}