Jean-Christophe PLAGNIOL-VILLARD | 21d08b9 | 2011-04-23 15:28:34 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
| 3 | * |
| 4 | * Under GPLv2 |
| 5 | */ |
| 6 | |
Jean-Christophe PLAGNIOL-VILLARD | 8c3583b | 2011-04-23 22:12:57 +0800 | [diff] [blame] | 7 | struct at91_init_soc { |
Jean-Christophe PLAGNIOL-VILLARD | 92100c1 | 2011-04-23 15:28:34 +0800 | [diff] [blame] | 8 | unsigned int *default_irq_priority; |
Jean-Christophe PLAGNIOL-VILLARD | 21d08b9 | 2011-04-23 15:28:34 +0800 | [diff] [blame] | 9 | void (*map_io)(void); |
Jean-Christophe PLAGNIOL-VILLARD | cfa5a1f | 2011-10-14 01:17:18 +0800 | [diff] [blame^] | 10 | void (*ioremap_registers)(void); |
Jean-Christophe PLAGNIOL-VILLARD | 51ddec7 | 2011-04-24 18:15:34 +0800 | [diff] [blame] | 11 | void (*register_clocks)(void); |
Jean-Christophe PLAGNIOL-VILLARD | 4653937 | 2011-04-24 18:20:28 +0800 | [diff] [blame] | 12 | void (*init)(void); |
Jean-Christophe PLAGNIOL-VILLARD | 21d08b9 | 2011-04-23 15:28:34 +0800 | [diff] [blame] | 13 | }; |
| 14 | |
Jean-Christophe PLAGNIOL-VILLARD | 8c3583b | 2011-04-23 22:12:57 +0800 | [diff] [blame] | 15 | extern struct at91_init_soc at91_boot_soc; |
| 16 | extern struct at91_init_soc at91cap9_soc; |
| 17 | extern struct at91_init_soc at91rm9200_soc; |
| 18 | extern struct at91_init_soc at91sam9260_soc; |
| 19 | extern struct at91_init_soc at91sam9261_soc; |
| 20 | extern struct at91_init_soc at91sam9263_soc; |
| 21 | extern struct at91_init_soc at91sam9g45_soc; |
| 22 | extern struct at91_init_soc at91sam9rl_soc; |
| 23 | extern struct at91_init_soc at91sam9x5_soc; |
| 24 | |
| 25 | static inline int at91_soc_is_enabled(void) |
| 26 | { |
| 27 | return at91_boot_soc.init != NULL; |
| 28 | } |
| 29 | |
| 30 | #if !defined(CONFIG_ARCH_AT91CAP9) |
| 31 | #define at91cap9_soc at91_boot_soc |
| 32 | #endif |
| 33 | |
| 34 | #if !defined(CONFIG_ARCH_AT91RM9200) |
| 35 | #define at91rm9200_soc at91_boot_soc |
| 36 | #endif |
| 37 | |
| 38 | #if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)) |
| 39 | #define at91sam9260_soc at91_boot_soc |
| 40 | #endif |
| 41 | |
| 42 | #if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)) |
| 43 | #define at91sam9261_soc at91_boot_soc |
| 44 | #endif |
| 45 | |
| 46 | #if !defined(CONFIG_ARCH_AT91SAM9263) |
| 47 | #define at91sam9263_soc at91_boot_soc |
| 48 | #endif |
| 49 | |
| 50 | #if !defined(CONFIG_ARCH_AT91SAM9G45) |
| 51 | #define at91sam9g45_soc at91_boot_soc |
| 52 | #endif |
| 53 | |
| 54 | #if !defined(CONFIG_ARCH_AT91SAM9RL) |
| 55 | #define at91sam9rl_soc at91_boot_soc |
| 56 | #endif |
| 57 | |
| 58 | #if !defined(CONFIG_ARCH_AT91SAM9X5) |
| 59 | #define at91sam9x5_soc at91_boot_soc |
| 60 | #endif |