soc.h 1.7 KB
Newer Older
1 2 3 4 5 6
/*
 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 *
 * Under GPLv2
 */

7
struct at91_init_soc {
8
	int builtin;
9
	void (*map_io)(void);
10
	void (*init)(void);
11 12
};

13 14 15 16 17 18 19 20
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;
21
extern struct at91_init_soc at91sam9n12_soc;
22
extern struct at91_init_soc sama5d3_soc;
23
extern struct at91_init_soc sama5d4_soc;
24

25
#define AT91_SOC_START(_name)				\
26
struct at91_init_soc __initdata _name##_soc		\
27 28 29 30 31 32 33
 __used							\
						= {	\
	.builtin	= 1,				\

#define AT91_SOC_END					\
};

34 35
static inline int at91_soc_is_enabled(void)
{
36
	return at91_boot_soc.builtin;
37 38
}

39
#if !defined(CONFIG_SOC_AT91RM9200)
40 41 42
#define at91rm9200_soc	at91_boot_soc
#endif

43
#if !defined(CONFIG_SOC_AT91SAM9260)
44 45 46
#define at91sam9260_soc	at91_boot_soc
#endif

47
#if !defined(CONFIG_SOC_AT91SAM9261)
48 49 50
#define at91sam9261_soc	at91_boot_soc
#endif

51
#if !defined(CONFIG_SOC_AT91SAM9263)
52 53 54
#define at91sam9263_soc	at91_boot_soc
#endif

55
#if !defined(CONFIG_SOC_AT91SAM9G45)
56 57 58
#define at91sam9g45_soc	at91_boot_soc
#endif

59
#if !defined(CONFIG_SOC_AT91SAM9RL)
60 61 62
#define at91sam9rl_soc	at91_boot_soc
#endif

63
#if !defined(CONFIG_SOC_AT91SAM9X5)
64 65
#define at91sam9x5_soc	at91_boot_soc
#endif
66 67 68 69

#if !defined(CONFIG_SOC_AT91SAM9N12)
#define at91sam9n12_soc	at91_boot_soc
#endif
70 71 72 73

#if !defined(CONFIG_SOC_SAMA5D3)
#define sama5d3_soc	at91_boot_soc
#endif
74 75 76 77

#if !defined(CONFIG_SOC_SAMA5D4)
#define sama5d4_soc	at91_boot_soc
#endif