Commit | Line | Data |
---|---|---|
02c981c0 | 1 | /* |
013dd12f | 2 | * Defines machines for CSR SiRFprimaII |
02c981c0 BD |
3 | * |
4 | * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company. | |
5 | * | |
6 | * Licensed under GPLv2 or later. | |
7 | */ | |
8 | ||
275786b7 | 9 | #include <linux/clocksource.h> |
02c981c0 BD |
10 | #include <linux/init.h> |
11 | #include <linux/kernel.h> | |
1bdfd27a | 12 | #include <asm/sizes.h> |
02c981c0 BD |
13 | #include <asm/mach-types.h> |
14 | #include <asm/mach/arch.h> | |
15 | #include <linux/of.h> | |
16 | #include <linux/of_platform.h> | |
17 | #include "common.h" | |
18 | ||
a4b4674e SG |
19 | void __init sirfsoc_init_late(void) |
20 | { | |
21 | sirfsoc_pm_init(); | |
22 | } | |
23 | ||
275786b7 AB |
24 | static __init void sirfsoc_init_time(void) |
25 | { | |
26 | /* initialize clocking early, we want to set the OS timer */ | |
27 | sirfsoc_of_clk_init(); | |
28 | clocksource_of_init(); | |
29 | } | |
30 | ||
4898de3d BS |
31 | static __init void sirfsoc_map_io(void) |
32 | { | |
33 | sirfsoc_map_lluart(); | |
34 | sirfsoc_map_scu(); | |
35 | } | |
36 | ||
d4fe49e5 BS |
37 | #ifdef CONFIG_ARCH_ATLAS6 |
38 | static const char *atlas6_dt_match[] __initdata = { | |
39 | "sirf,atlas6", | |
40 | NULL | |
41 | }; | |
42 | ||
43 | DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)") | |
44 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | |
630be7ea | 45 | .nr_irqs = 128, |
d4fe49e5 | 46 | .map_io = sirfsoc_map_io, |
275786b7 | 47 | .init_time = sirfsoc_init_time, |
d4fe49e5 BS |
48 | .init_late = sirfsoc_init_late, |
49 | .dt_compat = atlas6_dt_match, | |
50 | .restart = sirfsoc_restart, | |
51 | MACHINE_END | |
52 | #endif | |
53 | ||
d0ec63f8 BS |
54 | #ifdef CONFIG_ARCH_PRIMA2 |
55 | static const char *prima2_dt_match[] __initdata = { | |
5a0ec569 BS |
56 | "sirf,prima2", |
57 | NULL | |
02c981c0 BD |
58 | }; |
59 | ||
d0ec63f8 | 60 | DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)") |
02c981c0 | 61 | /* Maintainer: Barry Song <baohua.song@csr.com> */ |
630be7ea | 62 | .nr_irqs = 128, |
4898de3d | 63 | .map_io = sirfsoc_map_io, |
275786b7 | 64 | .init_time = sirfsoc_init_time, |
98b0124f | 65 | .dma_zone_size = SZ_256M, |
a4b4674e | 66 | .init_late = sirfsoc_init_late, |
d0ec63f8 | 67 | .dt_compat = prima2_dt_match, |
125c4033 | 68 | .restart = sirfsoc_restart, |
02c981c0 | 69 | MACHINE_END |
d0ec63f8 | 70 | #endif |
4898de3d BS |
71 | |
72 | #ifdef CONFIG_ARCH_MARCO | |
4898de3d BS |
73 | static const char *marco_dt_match[] __initdata = { |
74 | "sirf,marco", | |
75 | NULL | |
76 | }; | |
77 | ||
78 | DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)") | |
79 | /* Maintainer: Barry Song <baohua.song@csr.com> */ | |
80 | .smp = smp_ops(sirfsoc_smp_ops), | |
81 | .map_io = sirfsoc_map_io, | |
275786b7 | 82 | .init_time = sirfsoc_init_time, |
4898de3d BS |
83 | .init_late = sirfsoc_init_late, |
84 | .dt_compat = marco_dt_match, | |
85 | .restart = sirfsoc_restart, | |
86 | MACHINE_END | |
87 | #endif |