diff options
Diffstat (limited to 'arch/arm/mach-prima2/common.c')
-rw-r--r-- | arch/arm/mach-prima2/common.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c index 2d57aa479a7b..4f94cd87972a 100644 --- a/arch/arm/mach-prima2/common.c +++ b/arch/arm/mach-prima2/common.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Licensed under GPLv2 or later. | 6 | * Licensed under GPLv2 or later. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/clocksource.h> | ||
9 | #include <linux/init.h> | 10 | #include <linux/init.h> |
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/irqchip.h> | 12 | #include <linux/irqchip.h> |
@@ -31,12 +32,38 @@ void __init sirfsoc_init_late(void) | |||
31 | sirfsoc_pm_init(); | 32 | sirfsoc_pm_init(); |
32 | } | 33 | } |
33 | 34 | ||
35 | static __init void sirfsoc_init_time(void) | ||
36 | { | ||
37 | /* initialize clocking early, we want to set the OS timer */ | ||
38 | sirfsoc_of_clk_init(); | ||
39 | clocksource_of_init(); | ||
40 | } | ||
41 | |||
34 | static __init void sirfsoc_map_io(void) | 42 | static __init void sirfsoc_map_io(void) |
35 | { | 43 | { |
36 | sirfsoc_map_lluart(); | 44 | sirfsoc_map_lluart(); |
37 | sirfsoc_map_scu(); | 45 | sirfsoc_map_scu(); |
38 | } | 46 | } |
39 | 47 | ||
48 | #ifdef CONFIG_ARCH_ATLAS6 | ||
49 | static const char *atlas6_dt_match[] __initdata = { | ||
50 | "sirf,atlas6", | ||
51 | NULL | ||
52 | }; | ||
53 | |||
54 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") | ||
55 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | ||
56 | .nr_irqs = 128, | ||
57 | .map_io = sirfsoc_map_io, | ||
58 | .init_irq = irqchip_init, | ||
59 | .init_time = sirfsoc_init_time, | ||
60 | .init_machine = sirfsoc_mach_init, | ||
61 | .init_late = sirfsoc_init_late, | ||
62 | .dt_compat = atlas6_dt_match, | ||
63 | .restart = sirfsoc_restart, | ||
64 | MACHINE_END | ||
65 | #endif | ||
66 | |||
40 | #ifdef CONFIG_ARCH_PRIMA2 | 67 | #ifdef CONFIG_ARCH_PRIMA2 |
41 | static const char *prima2_dt_match[] __initdata = { | 68 | static const char *prima2_dt_match[] __initdata = { |
42 | "sirf,prima2", | 69 | "sirf,prima2", |
@@ -45,12 +72,10 @@ static const char *prima2_dt_match[] __initdata = { | |||
45 | 72 | ||
46 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") | 73 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") |
47 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | 74 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
75 | .nr_irqs = 128, | ||
48 | .map_io = sirfsoc_map_io, | 76 | .map_io = sirfsoc_map_io, |
49 | .init_irq = sirfsoc_of_irq_init, | 77 | .init_irq = irqchip_init, |
50 | .init_time = sirfsoc_prima2_timer_init, | 78 | .init_time = sirfsoc_init_time, |
51 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
52 | .handle_irq = sirfsoc_handle_irq, | ||
53 | #endif | ||
54 | .dma_zone_size = SZ_256M, | 79 | .dma_zone_size = SZ_256M, |
55 | .init_machine = sirfsoc_mach_init, | 80 | .init_machine = sirfsoc_mach_init, |
56 | .init_late = sirfsoc_init_late, | 81 | .init_late = sirfsoc_init_late, |
@@ -70,7 +95,7 @@ DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") | |||
70 | .smp = smp_ops(sirfsoc_smp_ops), | 95 | .smp = smp_ops(sirfsoc_smp_ops), |
71 | .map_io = sirfsoc_map_io, | 96 | .map_io = sirfsoc_map_io, |
72 | .init_irq = irqchip_init, | 97 | .init_irq = irqchip_init, |
73 | .init_time = sirfsoc_marco_timer_init, | 98 | .init_time = sirfsoc_init_time, |
74 | .init_machine = sirfsoc_mach_init, | 99 | .init_machine = sirfsoc_mach_init, |
75 | .init_late = sirfsoc_init_late, | 100 | .init_late = sirfsoc_init_late, |
76 | .dt_compat = marco_dt_match, | 101 | .dt_compat = marco_dt_match, |