diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-01-10 14:44:19 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2012-03-13 09:45:53 -0400 |
commit | 58458e0327f7a34ef9c8bc512290bf47e3de811b (patch) | |
tree | 247ca75e7eda3f1be5ba878e33d63bfe77b48135 | |
parent | 7ac9b9eb338d3960fbc044cb76790f4aab4fbb22 (diff) |
ARM: imx6q: convert to twd_local_timer_register() interface
Add support for the new smp_twd runtime registration interface
to the imx6q platforms, and remove the old compile-time support.
The imx6q DTS file is updated to match the TWD DT documentation.
Also present in this patch a DTS fix to the timer interrupt routing
(the PPI connection uses bits [15:8]) and trigger (rising edge).
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | arch/arm/boot/dts/imx6q.dtsi | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/localtimer.c | 35 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 2 |
4 files changed, 5 insertions, 39 deletions
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3664b5..4905f51a106f 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi | |||
@@ -88,9 +88,9 @@ | |||
88 | ranges; | 88 | ranges; |
89 | 89 | ||
90 | timer@00a00600 { | 90 | timer@00a00600 { |
91 | compatible = "arm,smp-twd"; | 91 | compatible = "arm,cortex-a9-twd-timer"; |
92 | reg = <0x00a00600 0x100>; | 92 | reg = <0x00a00600 0x20>; |
93 | interrupts = <1 13 0xf4>; | 93 | interrupts = <1 13 0xf01>; |
94 | }; | 94 | }; |
95 | 95 | ||
96 | L2: l2-cache@00a02000 { | 96 | L2: l2-cache@00a02000 { |
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 55db9c488f2b..190d57006163 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -71,7 +71,6 @@ obj-$(CONFIG_CPU_V7) += head-v7.o | |||
71 | AFLAGS_head-v7.o :=-Wa,-march=armv7-a | 71 | AFLAGS_head-v7.o :=-Wa,-march=armv7-a |
72 | obj-$(CONFIG_SMP) += platsmp.o | 72 | obj-$(CONFIG_SMP) += platsmp.o |
73 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 73 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
74 | obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o | ||
75 | obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o | 74 | obj-$(CONFIG_SOC_IMX6Q) += clock-imx6q.o mach-imx6q.o |
76 | 75 | ||
77 | ifeq ($(CONFIG_PM),y) | 76 | ifeq ($(CONFIG_PM),y) |
diff --git a/arch/arm/mach-imx/localtimer.c b/arch/arm/mach-imx/localtimer.c deleted file mode 100644 index 3a163515d41f..000000000000 --- a/arch/arm/mach-imx/localtimer.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/clockchips.h> | ||
15 | #include <linux/of_address.h> | ||
16 | #include <linux/of_irq.h> | ||
17 | #include <asm/smp_twd.h> | ||
18 | |||
19 | /* | ||
20 | * Setup the local clock events for a CPU. | ||
21 | */ | ||
22 | int __cpuinit local_timer_setup(struct clock_event_device *evt) | ||
23 | { | ||
24 | struct device_node *np; | ||
25 | |||
26 | np = of_find_compatible_node(NULL, NULL, "arm,smp-twd"); | ||
27 | if (!twd_base) { | ||
28 | twd_base = of_iomap(np, 0); | ||
29 | WARN_ON(!twd_base); | ||
30 | } | ||
31 | evt->irq = irq_of_parse_and_map(np, 0); | ||
32 | twd_timer_setup(evt); | ||
33 | |||
34 | return 0; | ||
35 | } | ||
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index c25728106917..a2eea8671ee5 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/phy.h> | 22 | #include <linux/phy.h> |
23 | #include <linux/micrel_phy.h> | 23 | #include <linux/micrel_phy.h> |
24 | #include <asm/smp_twd.h> | ||
24 | #include <asm/hardware/cache-l2x0.h> | 25 | #include <asm/hardware/cache-l2x0.h> |
25 | #include <asm/hardware/gic.h> | 26 | #include <asm/hardware/gic.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -119,6 +120,7 @@ static void __init imx6q_init_irq(void) | |||
119 | static void __init imx6q_timer_init(void) | 120 | static void __init imx6q_timer_init(void) |
120 | { | 121 | { |
121 | mx6q_clocks_init(); | 122 | mx6q_clocks_init(); |
123 | twd_local_timer_of_register(); | ||
122 | } | 124 | } |
123 | 125 | ||
124 | static struct sys_timer imx6q_timer = { | 126 | static struct sys_timer imx6q_timer = { |