]> Pileus Git - ~andy/linux/blob - arch/arm/mach-prima2/common.c
ARM: sirf: move irq driver to drivers/irqchip
[~andy/linux] / arch / arm / mach-prima2 / common.c
1 /*
2  * Defines machines for CSR SiRFprimaII
3  *
4  * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5  *
6  * Licensed under GPLv2 or later.
7  */
8
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/irqchip.h>
12 #include <asm/sizes.h>
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
19 static struct of_device_id sirfsoc_of_bus_ids[] __initdata = {
20         { .compatible = "simple-bus", },
21         {},
22 };
23
24 void __init sirfsoc_mach_init(void)
25 {
26         of_platform_bus_probe(NULL, sirfsoc_of_bus_ids, NULL);
27 }
28
29 void __init sirfsoc_init_late(void)
30 {
31         sirfsoc_pm_init();
32 }
33
34 static __init void sirfsoc_map_io(void)
35 {
36         sirfsoc_map_lluart();
37         sirfsoc_map_scu();
38 }
39
40 #ifdef CONFIG_ARCH_ATLAS6
41 static const char *atlas6_dt_match[] __initdata = {
42         "sirf,atlas6",
43         NULL
44 };
45
46 DT_MACHINE_START(ATLAS6_DT, "Generic ATLAS6 (Flattened Device Tree)")
47         /* Maintainer: Barry Song <baohua.song@csr.com> */
48         .map_io         = sirfsoc_map_io,
49         .init_irq       = irqchip_init,
50         .init_time      = sirfsoc_prima2_timer_init,
51         .init_machine   = sirfsoc_mach_init,
52         .init_late      = sirfsoc_init_late,
53         .dt_compat      = atlas6_dt_match,
54         .restart        = sirfsoc_restart,
55 MACHINE_END
56 #endif
57
58 #ifdef CONFIG_ARCH_PRIMA2
59 static const char *prima2_dt_match[] __initdata = {
60        "sirf,prima2",
61        NULL
62 };
63
64 DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
65         /* Maintainer: Barry Song <baohua.song@csr.com> */
66         .map_io         = sirfsoc_map_io,
67         .init_irq       = irqchip_init,
68         .init_time      = sirfsoc_prima2_timer_init,
69         .dma_zone_size  = SZ_256M,
70         .init_machine   = sirfsoc_mach_init,
71         .init_late      = sirfsoc_init_late,
72         .dt_compat      = prima2_dt_match,
73         .restart        = sirfsoc_restart,
74 MACHINE_END
75 #endif
76
77 #ifdef CONFIG_ARCH_MARCO
78 static const char *marco_dt_match[] __initdata = {
79         "sirf,marco",
80         NULL
81 };
82
83 DT_MACHINE_START(MARCO_DT, "Generic MARCO (Flattened Device Tree)")
84         /* Maintainer: Barry Song <baohua.song@csr.com> */
85         .smp            = smp_ops(sirfsoc_smp_ops),
86         .map_io         = sirfsoc_map_io,
87         .init_irq       = irqchip_init,
88         .init_time      = sirfsoc_marco_timer_init,
89         .init_machine   = sirfsoc_mach_init,
90         .init_late      = sirfsoc_init_late,
91         .dt_compat      = marco_dt_match,
92         .restart        = sirfsoc_restart,
93 MACHINE_END
94 #endif