Merge tag 'ftracetest-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[sfrench/cifs-2.6.git] / arch / arm / mach-at91 / soc.h
1 /*
2  * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
3  *
4  * Under GPLv2
5  */
6
7 struct at91_init_soc {
8         int builtin;
9         u32 extern_irq;
10         unsigned int *default_irq_priority;
11         void (*map_io)(void);
12         void (*ioremap_registers)(void);
13         void (*register_clocks)(void);
14         void (*register_devices)(void);
15         void (*init)(void);
16         void (*init_time)(void);
17 };
18
19 extern struct at91_init_soc at91_boot_soc;
20 extern struct at91_init_soc at91rm9200_soc;
21 extern struct at91_init_soc at91sam9260_soc;
22 extern struct at91_init_soc at91sam9261_soc;
23 extern struct at91_init_soc at91sam9263_soc;
24 extern struct at91_init_soc at91sam9g45_soc;
25 extern struct at91_init_soc at91sam9rl_soc;
26 extern struct at91_init_soc at91sam9x5_soc;
27 extern struct at91_init_soc at91sam9n12_soc;
28 extern struct at91_init_soc sama5d3_soc;
29 extern struct at91_init_soc sama5d4_soc;
30
31 #define AT91_SOC_START(_name)                           \
32 struct at91_init_soc __initdata _name##_soc             \
33  __used                                                 \
34                                                 = {     \
35         .builtin        = 1,                            \
36
37 #define AT91_SOC_END                                    \
38 };
39
40 static inline int at91_soc_is_enabled(void)
41 {
42         return at91_boot_soc.builtin;
43 }
44
45 #if !defined(CONFIG_SOC_AT91RM9200)
46 #define at91rm9200_soc  at91_boot_soc
47 #endif
48
49 #if !defined(CONFIG_SOC_AT91SAM9260)
50 #define at91sam9260_soc at91_boot_soc
51 #endif
52
53 #if !defined(CONFIG_SOC_AT91SAM9261)
54 #define at91sam9261_soc at91_boot_soc
55 #endif
56
57 #if !defined(CONFIG_SOC_AT91SAM9263)
58 #define at91sam9263_soc at91_boot_soc
59 #endif
60
61 #if !defined(CONFIG_SOC_AT91SAM9G45)
62 #define at91sam9g45_soc at91_boot_soc
63 #endif
64
65 #if !defined(CONFIG_SOC_AT91SAM9RL)
66 #define at91sam9rl_soc  at91_boot_soc
67 #endif
68
69 #if !defined(CONFIG_SOC_AT91SAM9X5)
70 #define at91sam9x5_soc  at91_boot_soc
71 #endif
72
73 #if !defined(CONFIG_SOC_AT91SAM9N12)
74 #define at91sam9n12_soc at91_boot_soc
75 #endif
76
77 #if !defined(CONFIG_SOC_SAMA5D3)
78 #define sama5d3_soc     at91_boot_soc
79 #endif
80
81 #if !defined(CONFIG_SOC_SAMA5D4)
82 #define sama5d4_soc     at91_boot_soc
83 #endif