diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-05-03 03:28:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-04 12:50:05 -0400 |
commit | 41ac329f607add059ae8b063375c5d9d6e7471cf (patch) | |
tree | b8e33a20cbac44e3f8cecef764e55b1d9ba7e311 | |
parent | 5b1f7ddf18b75adeb433ef9d91a2e4bd7580facc (diff) |
ARM: 6087/1: ux500: move sys_timer to cpu.c
Move the common system timer setup code to cpu.c.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-u8500.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/setup.h | 2 |
4 files changed, 23 insertions, 23 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index cd0bd36221b9..072196c57263 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -145,6 +145,6 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
145 | .map_io = u8500_map_io, | 145 | .map_io = u8500_map_io, |
146 | .init_irq = ux500_init_irq, | 146 | .init_irq = ux500_init_irq, |
147 | /* we re-use nomadik timer here */ | 147 | /* we re-use nomadik timer here */ |
148 | .timer = &u8500_timer, | 148 | .timer = &ux500_timer, |
149 | .init_machine = u8500_init_machine, | 149 | .init_machine = u8500_init_machine, |
150 | MACHINE_END | 150 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/cpu-u8500.c b/arch/arm/mach-ux500/cpu-u8500.c index 51e9bf2d71e2..d04299f3b6b5 100644 --- a/arch/arm/mach-ux500/cpu-u8500.c +++ b/arch/arm/mach-ux500/cpu-u8500.c | |||
@@ -17,9 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | 19 | ||
20 | #include <asm/localtimer.h> | ||
21 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
22 | #include <plat/mtu.h> | ||
23 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
24 | #include <mach/setup.h> | 22 | #include <mach/setup.h> |
25 | #include <mach/devices.h> | 23 | #include <mach/devices.h> |
@@ -78,22 +76,3 @@ void __init u8500_init_devices(void) | |||
78 | 76 | ||
79 | return ; | 77 | return ; |
80 | } | 78 | } |
81 | |||
82 | static void __init u8500_timer_init(void) | ||
83 | { | ||
84 | #ifdef CONFIG_LOCAL_TIMERS | ||
85 | /* Setup the local timer base */ | ||
86 | twd_base = __io_address(U8500_TWD_BASE); | ||
87 | #endif | ||
88 | /* Setup the MTU base */ | ||
89 | if (cpu_is_u8500ed()) | ||
90 | mtu_base = __io_address(U8500_MTU0_BASE_ED); | ||
91 | else | ||
92 | mtu_base = __io_address(U8500_MTU0_BASE); | ||
93 | |||
94 | nmdk_timer_init(); | ||
95 | } | ||
96 | |||
97 | struct sys_timer u8500_timer = { | ||
98 | .init = u8500_timer_init, | ||
99 | }; | ||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 05615c094493..d81ad023963c 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -13,7 +13,9 @@ | |||
13 | #include <asm/hardware/cache-l2x0.h> | 13 | #include <asm/hardware/cache-l2x0.h> |
14 | #include <asm/hardware/gic.h> | 14 | #include <asm/hardware/gic.h> |
15 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
16 | #include <asm/localtimer.h> | ||
16 | 17 | ||
18 | #include <plat/mtu.h> | ||
17 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
18 | #include <mach/setup.h> | 20 | #include <mach/setup.h> |
19 | #include <mach/devices.h> | 21 | #include <mach/devices.h> |
@@ -76,3 +78,22 @@ static int ux500_l2x0_init(void) | |||
76 | } | 78 | } |
77 | early_initcall(ux500_l2x0_init); | 79 | early_initcall(ux500_l2x0_init); |
78 | #endif | 80 | #endif |
81 | |||
82 | static void __init ux500_timer_init(void) | ||
83 | { | ||
84 | #ifdef CONFIG_LOCAL_TIMERS | ||
85 | /* Setup the local timer base */ | ||
86 | twd_base = __io_address(UX500_TWD_BASE); | ||
87 | #endif | ||
88 | /* Setup the MTU base */ | ||
89 | if (cpu_is_u8500ed()) | ||
90 | mtu_base = __io_address(U8500_MTU0_BASE_ED); | ||
91 | else | ||
92 | mtu_base = __io_address(UX500_MTU0_BASE); | ||
93 | |||
94 | nmdk_timer_init(); | ||
95 | } | ||
96 | |||
97 | struct sys_timer ux500_timer = { | ||
98 | .init = ux500_timer_init, | ||
99 | }; | ||
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index 6187effe92db..c730d078f9ab 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h | |||
@@ -27,7 +27,7 @@ extern void nmdk_timer_init(void); | |||
27 | extern void __init amba_add_devices(struct amba_device *devs[], int num); | 27 | extern void __init amba_add_devices(struct amba_device *devs[], int num); |
28 | 28 | ||
29 | struct sys_timer; | 29 | struct sys_timer; |
30 | extern struct sys_timer u8500_timer; | 30 | extern struct sys_timer ux500_timer; |
31 | 31 | ||
32 | #define __IO_DEV_DESC(x, sz) { \ | 32 | #define __IO_DEV_DESC(x, sz) { \ |
33 | .virtual = IO_ADDRESS(x), \ | 33 | .virtual = IO_ADDRESS(x), \ |