summaryrefslogtreecommitdiff
path: root/arch/arm/mach-highbank
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2015-02-20 17:04:08 +0900
committerTom Rini <trini@ti.com>2015-02-21 08:23:51 -0500
commit72a8ff4b04771071023ff1024e268c2fbdf159e7 (patch)
treede6b94a073d2defadd23d70b70f2685fa7d1cb0f /arch/arm/mach-highbank
parentef917ddb1d9240b075f3c03ddf6e246c89b86fa6 (diff)
ARM: highbank: move SoC sources to mach-highbank
Move arch/arm/cpu/armv7/highbank/* -> arch/arm/mach-highbank/* Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/arm/mach-highbank')
-rw-r--r--arch/arm/mach-highbank/Kconfig12
-rw-r--r--arch/arm/mach-highbank/Makefile8
-rw-r--r--arch/arm/mach-highbank/timer.c34
3 files changed, 54 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
new file mode 100644
index 0000000000..0e73c04142
--- /dev/null
+++ b/arch/arm/mach-highbank/Kconfig
@@ -0,0 +1,12 @@
+if ARCH_HIGHBANK
+
+config SYS_BOARD
+ default "highbank"
+
+config SYS_SOC
+ default "highbank"
+
+config SYS_CONFIG_NAME
+ default "highbank"
+
+endif
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile
new file mode 100644
index 0000000000..876099d9a1
--- /dev/null
+++ b/arch/arm/mach-highbank/Makefile
@@ -0,0 +1,8 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y := timer.o
diff --git a/arch/arm/mach-highbank/timer.c b/arch/arm/mach-highbank/timer.c
new file mode 100644
index 0000000000..d56bf21133
--- /dev/null
+++ b/arch/arm/mach-highbank/timer.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ *
+ * Based on arm926ejs/mx27/timer.c
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch-armv7/systimer.h>
+
+#undef SYSTIMER_BASE
+#define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */
+
+static struct systimer *systimer_base = (struct systimer *)SYSTIMER_BASE;
+
+/*
+ * Start the timer
+ */
+int timer_init(void)
+{
+ /*
+ * Setup timer0
+ */
+ writel(0, &systimer_base->timer0control);
+ writel(SYSTIMER_RELOAD, &systimer_base->timer0load);
+ writel(SYSTIMER_RELOAD, &systimer_base->timer0value);
+ writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256,
+ &systimer_base->timer0control);
+
+ return 0;
+
+}