aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-highbank/localtimer.c
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2011-05-17 21:02:49 -0500
committerArnd Bergmann <arnd@arndb.de>2011-10-31 14:14:02 +0100
commit6738845783e9113feec22f20834d0e956808da3b (patch)
tree74a038d8c7f456d39d65b8af957f9dd03510a119 /arch/arm/mach-highbank/localtimer.c
parent986cf2e91968759af4268160348d8f31726525e8 (diff)
downloadkernel_samsung_smdk4412-6738845783e9113feec22f20834d0e956808da3b.zip
kernel_samsung_smdk4412-6738845783e9113feec22f20834d0e956808da3b.tar.gz
kernel_samsung_smdk4412-6738845783e9113feec22f20834d0e956808da3b.tar.bz2
ARM: highbank: add SMP support
This enables SMP support on highbank processor. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Jamie Iles <jamie@jamieiles.com> Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-highbank/localtimer.c')
-rw-r--r--arch/arm/mach-highbank/localtimer.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/localtimer.c b/arch/arm/mach-highbank/localtimer.c
new file mode 100644
index 0000000..5a00e79
--- /dev/null
+++ b/arch/arm/mach-highbank/localtimer.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2010-2011 Calxeda, Inc.
+ * Based on localtimer.c, Copyright (C) 2002 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/init.h>
+#include <linux/clockchips.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
+
+#include <asm/smp_twd.h>
+
+/*
+ * Setup the local clock events for a CPU.
+ */
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
+{
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "arm,smp-twd");
+ if (!twd_base) {
+ twd_base = of_iomap(np, 0);
+ WARN_ON(!twd_base);
+ }
+ evt->irq = irq_of_parse_and_map(np, 0);
+ twd_timer_setup(evt);
+ return 0;
+}