Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux-drm-fsl-dcu.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 (*init)(void);
15 };
16
17 extern struct at91_init_soc at91_boot_soc;
18 extern struct at91_init_soc at91rm9200_soc;
19 extern struct at91_init_soc at91sam9260_soc;
20 extern struct at91_init_soc at91sam9261_soc;
21 extern struct at91_init_soc at91sam9263_soc;
22 extern struct at91_init_soc at91sam9g45_soc;
23 extern struct at91_init_soc at91sam9rl_soc;
24 extern struct at91_init_soc at91sam9x5_soc;
25 extern struct at91_init_soc at91sam9n12_soc;
26 extern struct at91_init_soc sama5d3_soc;
27
28 #define AT91_SOC_START(_name)                           \
29 struct at91_init_soc __initdata _name##_soc             \
30  __used                                                 \
31                                                 = {     \
32         .builtin        = 1,                            \
33
34 #define AT91_SOC_END                                    \
35 };
36
37 static inline int at91_soc_is_enabled(void)
38 {
39         return at91_boot_soc.builtin;
40 }
41
42 #if !defined(CONFIG_SOC_AT91RM9200)
43 #define at91rm9200_soc  at91_boot_soc
44 #endif
45
46 #if !defined(CONFIG_SOC_AT91SAM9260)
47 #define at91sam9260_soc at91_boot_soc
48 #endif
49
50 #if !defined(CONFIG_SOC_AT91SAM9261)
51 #define at91sam9261_soc at91_boot_soc
52 #endif
53
54 #if !defined(CONFIG_SOC_AT91SAM9263)
55 #define at91sam9263_soc at91_boot_soc
56 #endif
57
58 #if !defined(CONFIG_SOC_AT91SAM9G45)
59 #define at91sam9g45_soc at91_boot_soc
60 #endif
61
62 #if !defined(CONFIG_SOC_AT91SAM9RL)
63 #define at91sam9rl_soc  at91_boot_soc
64 #endif
65
66 #if !defined(CONFIG_SOC_AT91SAM9X5)
67 #define at91sam9x5_soc  at91_boot_soc
68 #endif
69
70 #if !defined(CONFIG_SOC_AT91SAM9N12)
71 #define at91sam9n12_soc at91_boot_soc
72 #endif
73
74 #if !defined(CONFIG_SOC_SAMA5D3)
75 #define sama5d3_soc     at91_boot_soc
76 #endif