blob: ae6c0b2f1146fd43b683c6bff4a8a2c4b6f549ae [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-VILLARD8d39e0fd02012-08-16 17:36:55 +08008 int builtin;
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +08009 void (*map_io)(void);
Jean-Christophe PLAGNIOL-VILLARD46539372011-04-24 18:20:28 +080010 void (*init)(void);
Jean-Christophe PLAGNIOL-VILLARD21d08b92011-04-23 15:28:34 +080011};
12
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080013extern struct at91_init_soc at91_boot_soc;
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080014extern struct at91_init_soc at91rm9200_soc;
15extern struct at91_init_soc at91sam9260_soc;
16extern struct at91_init_soc at91sam9261_soc;
17extern struct at91_init_soc at91sam9263_soc;
18extern struct at91_init_soc at91sam9g45_soc;
19extern struct at91_init_soc at91sam9rl_soc;
20extern struct at91_init_soc at91sam9x5_soc;
Hong Xu02059682012-04-17 14:26:30 +080021extern struct at91_init_soc at91sam9n12_soc;
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000022extern struct at91_init_soc sama5d3_soc;
Nicolas Ferre2dc850b2014-09-15 18:15:54 +020023extern struct at91_init_soc sama5d4_soc;
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080024
Jean-Christophe PLAGNIOL-VILLARD8d39e0fd02012-08-16 17:36:55 +080025#define AT91_SOC_START(_name) \
Ludovic Desroches84ddb082013-03-22 13:24:09 +000026struct at91_init_soc __initdata _name##_soc \
Jean-Christophe PLAGNIOL-VILLARD8d39e0fd02012-08-16 17:36:55 +080027 __used \
28 = { \
29 .builtin = 1, \
30
31#define AT91_SOC_END \
32};
33
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080034static inline int at91_soc_is_enabled(void)
35{
Jean-Christophe PLAGNIOL-VILLARD8d39e0fd02012-08-16 17:36:55 +080036 return at91_boot_soc.builtin;
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080037}
38
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080039#if !defined(CONFIG_SOC_AT91RM9200)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080040#define at91rm9200_soc at91_boot_soc
41#endif
42
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080043#if !defined(CONFIG_SOC_AT91SAM9260)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080044#define at91sam9260_soc at91_boot_soc
45#endif
46
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080047#if !defined(CONFIG_SOC_AT91SAM9261)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080048#define at91sam9261_soc at91_boot_soc
49#endif
50
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080051#if !defined(CONFIG_SOC_AT91SAM9263)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080052#define at91sam9263_soc at91_boot_soc
53#endif
54
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080055#if !defined(CONFIG_SOC_AT91SAM9G45)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080056#define at91sam9g45_soc at91_boot_soc
57#endif
58
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080059#if !defined(CONFIG_SOC_AT91SAM9RL)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080060#define at91sam9rl_soc at91_boot_soc
61#endif
62
Jean-Christophe PLAGNIOL-VILLARD1e3ce2b2012-04-06 11:51:50 +080063#if !defined(CONFIG_SOC_AT91SAM9X5)
Jean-Christophe PLAGNIOL-VILLARD8c3583b2011-04-23 22:12:57 +080064#define at91sam9x5_soc at91_boot_soc
65#endif
Hong Xu02059682012-04-17 14:26:30 +080066
67#if !defined(CONFIG_SOC_AT91SAM9N12)
68#define at91sam9n12_soc at91_boot_soc
69#endif
Ludovic Desroches8f4b4792013-03-22 13:24:12 +000070
71#if !defined(CONFIG_SOC_SAMA5D3)
72#define sama5d3_soc at91_boot_soc
73#endif
Nicolas Ferre2dc850b2014-09-15 18:15:54 +020074
75#if !defined(CONFIG_SOC_SAMA5D4)
76#define sama5d4_soc at91_boot_soc
77#endif