blob: 683dddfd8b133facb24a967aa40ceca51a358010 [file] [log] [blame]
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +08001/*
2 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
3 *
4 * Under GPLv2
5 */
6
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +08007struct at91_init_soc {
Jean-Christophe PLAGNIOL-VILLARD92100c12011-04-23 15:28:34 +08008 unsigned int *default_irq_priority;
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +08009 void (*map_io)(void);
Jean-Christophe PLAGNIOL-VILLARDcfa5a1f2011-10-14 01:17:18 +080010 void (*ioremap_registers)(void);
Jean-Christophe PLAGNIOL-VILLARD51ddec72011-04-24 18:15:34 +080011 void (*register_clocks)(void);
Jean-Christophe PLAGNIOL-VILLARD46539372011-04-24 18:20:28 +080012 void (*init)(void);
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +080013};
14
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080015extern struct at91_init_soc at91_boot_soc;
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080016extern struct at91_init_soc at91rm9200_soc;
17extern struct at91_init_soc at91sam9260_soc;
18extern struct at91_init_soc at91sam9261_soc;
19extern struct at91_init_soc at91sam9263_soc;
20extern struct at91_init_soc at91sam9g45_soc;
21extern struct at91_init_soc at91sam9rl_soc;
22extern struct at91_init_soc at91sam9x5_soc;
23
24static inline int at91_soc_is_enabled(void)
25{
26 return at91_boot_soc.init != NULL;
27}
28
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080029#if !defined(CONFIG_SOC_AT91RM9200)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080030#define at91rm9200_soc at91_boot_soc
31#endif
32
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080033#if !defined(CONFIG_SOC_AT91SAM9260)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080034#define at91sam9260_soc at91_boot_soc
35#endif
36
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080037#if !defined(CONFIG_SOC_AT91SAM9261)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080038#define at91sam9261_soc at91_boot_soc
39#endif
40
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080041#if !defined(CONFIG_SOC_AT91SAM9263)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080042#define at91sam9263_soc at91_boot_soc
43#endif
44
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080045#if !defined(CONFIG_SOC_AT91SAM9G45)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080046#define at91sam9g45_soc at91_boot_soc
47#endif
48
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080049#if !defined(CONFIG_SOC_AT91SAM9RL)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080050#define at91sam9rl_soc at91_boot_soc
51#endif
52
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080053#if !defined(CONFIG_SOC_AT91SAM9X5)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080054#define at91sam9x5_soc at91_boot_soc
55#endif