Commit | Line | Data |
---|---|---|
21d08b9d JCPV |
1 | /* |
2 | * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | |
3 | * | |
4 | * Under GPLv2 | |
5 | */ | |
6 | ||
8c3583b6 | 7 | struct at91_init_soc { |
8d39e0fd | 8 | int builtin; |
546c830c | 9 | u32 extern_irq; |
92100c12 | 10 | unsigned int *default_irq_priority; |
21d08b9d | 11 | void (*map_io)(void); |
cfa5a1fe | 12 | void (*ioremap_registers)(void); |
51ddec76 | 13 | void (*register_clocks)(void); |
46539374 | 14 | void (*init)(void); |
21d08b9d JCPV |
15 | }; |
16 | ||
8c3583b6 | 17 | extern struct at91_init_soc at91_boot_soc; |
8c3583b6 JCPV |
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; | |
02059684 | 25 | extern struct at91_init_soc at91sam9n12_soc; |
8f4b4794 | 26 | extern struct at91_init_soc sama5d3_soc; |
2dc850b6 | 27 | extern struct at91_init_soc sama5d4_soc; |
8c3583b6 | 28 | |
8d39e0fd | 29 | #define AT91_SOC_START(_name) \ |
84ddb087 | 30 | struct at91_init_soc __initdata _name##_soc \ |
8d39e0fd JCPV |
31 | __used \ |
32 | = { \ | |
33 | .builtin = 1, \ | |
34 | ||
35 | #define AT91_SOC_END \ | |
36 | }; | |
37 | ||
8c3583b6 JCPV |
38 | static inline int at91_soc_is_enabled(void) |
39 | { | |
8d39e0fd | 40 | return at91_boot_soc.builtin; |
8c3583b6 JCPV |
41 | } |
42 | ||
1e3ce2b8 | 43 | #if !defined(CONFIG_SOC_AT91RM9200) |
8c3583b6 JCPV |
44 | #define at91rm9200_soc at91_boot_soc |
45 | #endif | |
46 | ||
1e3ce2b8 | 47 | #if !defined(CONFIG_SOC_AT91SAM9260) |
8c3583b6 JCPV |
48 | #define at91sam9260_soc at91_boot_soc |
49 | #endif | |
50 | ||
1e3ce2b8 | 51 | #if !defined(CONFIG_SOC_AT91SAM9261) |
8c3583b6 JCPV |
52 | #define at91sam9261_soc at91_boot_soc |
53 | #endif | |
54 | ||
1e3ce2b8 | 55 | #if !defined(CONFIG_SOC_AT91SAM9263) |
8c3583b6 JCPV |
56 | #define at91sam9263_soc at91_boot_soc |
57 | #endif | |
58 | ||
1e3ce2b8 | 59 | #if !defined(CONFIG_SOC_AT91SAM9G45) |
8c3583b6 JCPV |
60 | #define at91sam9g45_soc at91_boot_soc |
61 | #endif | |
62 | ||
1e3ce2b8 | 63 | #if !defined(CONFIG_SOC_AT91SAM9RL) |
8c3583b6 JCPV |
64 | #define at91sam9rl_soc at91_boot_soc |
65 | #endif | |
66 | ||
1e3ce2b8 | 67 | #if !defined(CONFIG_SOC_AT91SAM9X5) |
8c3583b6 JCPV |
68 | #define at91sam9x5_soc at91_boot_soc |
69 | #endif | |
02059684 HX |
70 | |
71 | #if !defined(CONFIG_SOC_AT91SAM9N12) | |
72 | #define at91sam9n12_soc at91_boot_soc | |
73 | #endif | |
8f4b4794 LD |
74 | |
75 | #if !defined(CONFIG_SOC_SAMA5D3) | |
76 | #define sama5d3_soc at91_boot_soc | |
77 | #endif | |
2dc850b6 NF |
78 | |
79 | #if !defined(CONFIG_SOC_SAMA5D4) | |
80 | #define sama5d4_soc at91_boot_soc | |
81 | #endif |