diff options
author | Barry Song <Baohua.Song@csr.com> | 2012-12-20 04:33:49 -0500 |
---|---|---|
committer | Barry Song <Barry.Song@csr.com> | 2013-01-22 06:38:24 -0500 |
commit | 0d5983a62ad5749068a507e0c579af88f4753261 (patch) | |
tree | 6931850f61dc121718e1de05ca438263c409696c | |
parent | ea38960fb63ab5cce2442fa88f5041bcfb1ae8e3 (diff) |
ARM: PRIMA2: mv timer to timer-prima2 as we will add timer-marco
Marco timer has different timer IP with prima2, so rename the current timer
to timer-prima2 so that we can add timer-marco.
at the same time, if we don't find prima2 timer node in dt, don't panic the
system as we will make prima2 and marco use same kernel image.
Signed-off-by: Barry Song <Baohua.Song@csr.com>
-rw-r--r-- | arch/arm/mach-prima2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/common.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/common.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-prima2/timer-prima2.c (renamed from arch/arm/mach-prima2/timer.c) | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-prima2/Makefile index fc9ce22e2b5a..0007a6ec78f2 100644 --- a/arch/arm/mach-prima2/Makefile +++ b/arch/arm/mach-prima2/Makefile | |||
@@ -1,4 +1,3 @@ | |||
1 | obj-y := timer.o | ||
2 | obj-y += rstc.o | 1 | obj-y += rstc.o |
3 | obj-y += common.o | 2 | obj-y += common.o |
4 | obj-y += rtciobrg.o | 3 | obj-y += rtciobrg.o |
@@ -6,3 +5,4 @@ obj-$(CONFIG_DEBUG_LL) += lluart.o | |||
6 | obj-$(CONFIG_CACHE_L2X0) += l2x0.o | 5 | obj-$(CONFIG_CACHE_L2X0) += l2x0.o |
7 | obj-$(CONFIG_SUSPEND) += pm.o sleep.o | 6 | obj-$(CONFIG_SUSPEND) += pm.o sleep.o |
8 | obj-$(CONFIG_SIRF_IRQ) += irq.o | 7 | obj-$(CONFIG_SIRF_IRQ) += irq.o |
8 | obj-$(CONFIG_ARCH_PRIMA2) += timer-prima2.o | ||
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index ed3570e5eb8f..8e6f6681b546 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c | |||
@@ -40,7 +40,7 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") | |||
40 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 40 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
41 | .map_io = sirfsoc_map_lluart, | 41 | .map_io = sirfsoc_map_lluart, |
42 | .init_irq = sirfsoc_of_irq_init, | 42 | .init_irq = sirfsoc_of_irq_init, |
43 | .init_time = sirfsoc_timer_init, | 43 | .init_time = sirfsoc_prima2_timer_init, |
44 | .dma_zone_size = SZ_256M, | 44 | .dma_zone_size = SZ_256M, |
45 | .init_machine = sirfsoc_mach_init, | 45 | .init_machine = sirfsoc_mach_init, |
46 | .init_late = sirfsoc_init_late, | 46 | .init_late = sirfsoc_init_late, |
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h index 9c75f124e3cf..d6890b6833c9 100644 --- a/arch/arm/mach-prima2/common.h +++ b/arch/arm/mach-prima2/common.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <asm/mach/time.h> | 13 | #include <asm/mach/time.h> |
14 | 14 | ||
15 | extern void sirfsoc_timer_init(void); | 15 | extern void sirfsoc_prima2_timer_init(void); |
16 | 16 | ||
17 | extern void __init sirfsoc_of_irq_init(void); | 17 | extern void __init sirfsoc_of_irq_init(void); |
18 | extern void __init sirfsoc_of_clk_init(void); | 18 | extern void __init sirfsoc_of_clk_init(void); |
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer-prima2.c index 8c732a5beb7f..309e724735b7 100644 --- a/arch/arm/mach-prima2/timer.c +++ b/arch/arm/mach-prima2/timer-prima2.c | |||
@@ -187,7 +187,7 @@ static void __init sirfsoc_clockevent_init(void) | |||
187 | } | 187 | } |
188 | 188 | ||
189 | /* initialize the kernel jiffy timer source */ | 189 | /* initialize the kernel jiffy timer source */ |
190 | void __init sirfsoc_timer_init(void) | 190 | void __init sirfsoc_prima2_timer_init(void) |
191 | { | 191 | { |
192 | unsigned long rate; | 192 | unsigned long rate; |
193 | struct clk *clk; | 193 | struct clk *clk; |
@@ -226,14 +226,14 @@ static struct of_device_id timer_ids[] = { | |||
226 | {}, | 226 | {}, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | void __init sirfsoc_of_timer_map(void) | 229 | static void __init sirfsoc_of_timer_map(void) |
230 | { | 230 | { |
231 | struct device_node *np; | 231 | struct device_node *np; |
232 | const unsigned int *intspec; | 232 | const unsigned int *intspec; |
233 | 233 | ||
234 | np = of_find_matching_node(NULL, timer_ids); | 234 | np = of_find_matching_node(NULL, timer_ids); |
235 | if (!np) | 235 | if (!np) |
236 | panic("unable to find compatible timer node in dtb\n"); | 236 | return; |
237 | sirfsoc_timer_base = of_iomap(np, 0); | 237 | sirfsoc_timer_base = of_iomap(np, 0); |
238 | if (!sirfsoc_timer_base) | 238 | if (!sirfsoc_timer_base) |
239 | panic("unable to map timer cpu registers\n"); | 239 | panic("unable to map timer cpu registers\n"); |