2011-04-23 14:28:34 +07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
|
|
|
*
|
|
|
|
* Under GPLv2
|
|
|
|
*/
|
|
|
|
|
2011-04-23 21:12:57 +07:00
|
|
|
struct at91_init_soc {
|
2012-08-16 16:36:55 +07:00
|
|
|
int builtin;
|
2013-06-01 21:40:11 +07:00
|
|
|
u32 extern_irq;
|
2011-04-23 14:28:34 +07:00
|
|
|
unsigned int *default_irq_priority;
|
2011-04-23 14:28:34 +07:00
|
|
|
void (*map_io)(void);
|
2011-10-14 00:17:18 +07:00
|
|
|
void (*ioremap_registers)(void);
|
2011-04-24 17:15:34 +07:00
|
|
|
void (*register_clocks)(void);
|
2014-07-02 22:49:28 +07:00
|
|
|
void (*register_devices)(void);
|
2011-04-24 17:20:28 +07:00
|
|
|
void (*init)(void);
|
2014-09-02 23:05:04 +07:00
|
|
|
void (*init_time)(void);
|
2011-04-23 14:28:34 +07:00
|
|
|
};
|
|
|
|
|
2011-04-23 21:12:57 +07:00
|
|
|
extern struct at91_init_soc at91_boot_soc;
|
|
|
|
extern struct at91_init_soc at91rm9200_soc;
|
|
|
|
extern struct at91_init_soc at91sam9260_soc;
|
|
|
|
extern struct at91_init_soc at91sam9261_soc;
|
|
|
|
extern struct at91_init_soc at91sam9263_soc;
|
|
|
|
extern struct at91_init_soc at91sam9g45_soc;
|
|
|
|
extern struct at91_init_soc at91sam9rl_soc;
|
|
|
|
extern struct at91_init_soc at91sam9x5_soc;
|
2012-04-17 13:26:30 +07:00
|
|
|
extern struct at91_init_soc at91sam9n12_soc;
|
2013-03-22 20:24:12 +07:00
|
|
|
extern struct at91_init_soc sama5d3_soc;
|
2011-04-23 21:12:57 +07:00
|
|
|
|
2012-08-16 16:36:55 +07:00
|
|
|
#define AT91_SOC_START(_name) \
|
2013-03-22 20:24:09 +07:00
|
|
|
struct at91_init_soc __initdata _name##_soc \
|
2012-08-16 16:36:55 +07:00
|
|
|
__used \
|
|
|
|
= { \
|
|
|
|
.builtin = 1, \
|
|
|
|
|
|
|
|
#define AT91_SOC_END \
|
|
|
|
};
|
|
|
|
|
2011-04-23 21:12:57 +07:00
|
|
|
static inline int at91_soc_is_enabled(void)
|
|
|
|
{
|
2012-08-16 16:36:55 +07:00
|
|
|
return at91_boot_soc.builtin;
|
2011-04-23 21:12:57 +07:00
|
|
|
}
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91RM9200)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91rm9200_soc at91_boot_soc
|
|
|
|
#endif
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9260)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91sam9260_soc at91_boot_soc
|
|
|
|
#endif
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9261)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91sam9261_soc at91_boot_soc
|
|
|
|
#endif
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9263)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91sam9263_soc at91_boot_soc
|
|
|
|
#endif
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9G45)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91sam9g45_soc at91_boot_soc
|
|
|
|
#endif
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9RL)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91sam9rl_soc at91_boot_soc
|
|
|
|
#endif
|
|
|
|
|
2012-04-06 10:51:50 +07:00
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9X5)
|
2011-04-23 21:12:57 +07:00
|
|
|
#define at91sam9x5_soc at91_boot_soc
|
|
|
|
#endif
|
2012-04-17 13:26:30 +07:00
|
|
|
|
|
|
|
#if !defined(CONFIG_SOC_AT91SAM9N12)
|
|
|
|
#define at91sam9n12_soc at91_boot_soc
|
|
|
|
#endif
|
2013-03-22 20:24:12 +07:00
|
|
|
|
|
|
|
#if !defined(CONFIG_SOC_SAMA5D3)
|
|
|
|
#define sama5d3_soc at91_boot_soc
|
|
|
|
#endif
|