diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-08-16 09:36:55 (GMT) |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-10-13 01:09:28 (GMT) |
commit | 8d39e0fd080fbc2287bca3f596741a38281634da (patch) | |
tree | 978c81e9174e9a9c61908588beeaca3865feabea /arch/arm/mach-at91/soc.h | |
parent | 4d7127dace8cf4b05eb7c8c8531fc204fbb195f4 (diff) | |
download | linux-8d39e0fd080fbc2287bca3f596741a38281634da.tar.xz |
arm: at91: use macro to declare soc boot data
Instead of check the pointer of the init function, check the new builtin bool
to known if the soc is enabled.
This is needed as with the switch to the pinctrl the init will be NULL on pure
DT SoC.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/mach-at91/soc.h')
-rw-r--r-- | arch/arm/mach-at91/soc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index a9cfeb1..9c6d3d4 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h @@ -5,6 +5,7 @@ */ struct at91_init_soc { + int builtin; unsigned int *default_irq_priority; void (*map_io)(void); void (*ioremap_registers)(void); @@ -22,9 +23,18 @@ extern struct at91_init_soc at91sam9rl_soc; extern struct at91_init_soc at91sam9x5_soc; extern struct at91_init_soc at91sam9n12_soc; +#define AT91_SOC_START(_name) \ +struct at91_init_soc __initdata at91##_name##_soc \ + __used \ + = { \ + .builtin = 1, \ + +#define AT91_SOC_END \ +}; + static inline int at91_soc_is_enabled(void) { - return at91_boot_soc.init != NULL; + return at91_boot_soc.builtin; } #if !defined(CONFIG_SOC_AT91RM9200) |