diff options
author | Rob Herring <rob.herring@calxeda.com> | 2011-05-17 22:02:49 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 09:14:02 -0400 |
commit | 6738845783e9113feec22f20834d0e956808da3b (patch) | |
tree | 74a038d8c7f456d39d65b8af957f9dd03510a119 /arch/arm/mach-highbank/localtimer.c | |
parent | 986cf2e91968759af4268160348d8f31726525e8 (diff) |
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.c | 40 |
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 000000000000..5a00e7945fdf --- /dev/null +++ b/arch/arm/mach-highbank/localtimer.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright 2010-2011 Calxeda, Inc. | ||
3 | * Based on localtimer.c, Copyright (C) 2002 ARM Ltd. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/clockchips.h> | ||
19 | #include <linux/of.h> | ||
20 | #include <linux/of_address.h> | ||
21 | #include <linux/of_irq.h> | ||
22 | |||
23 | #include <asm/smp_twd.h> | ||
24 | |||
25 | /* | ||
26 | * Setup the local clock events for a CPU. | ||
27 | */ | ||
28 | int __cpuinit local_timer_setup(struct clock_event_device *evt) | ||
29 | { | ||
30 | struct device_node *np; | ||
31 | |||
32 | np = of_find_compatible_node(NULL, NULL, "arm,smp-twd"); | ||
33 | if (!twd_base) { | ||
34 | twd_base = of_iomap(np, 0); | ||
35 | WARN_ON(!twd_base); | ||
36 | } | ||
37 | evt->irq = irq_of_parse_and_map(np, 0); | ||
38 | twd_timer_setup(evt); | ||
39 | return 0; | ||
40 | } | ||