diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 15:20:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 15:20:41 -0800 |
commit | 3298a3511f1e73255a8dc023efd909e569eea037 (patch) | |
tree | 2d8e9bdb9e398049e3876b99fbb4d51099a45cc3 /arch/arm/mach-omap2/soc.h | |
parent | 5ce7aba976ebdfbf467e3cbcd3a7536ebdec4b11 (diff) | |
parent | acb7452369e4f8749dd32d48dbda98936035a87c (diff) | |
download | op-kernel-dev-3298a3511f1e73255a8dc023efd909e569eea037.zip op-kernel-dev-3298a3511f1e73255a8dc023efd909e569eea037.tar.gz |
Merge tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC multiplatform support from Arnd Bergmann:
"Converting more ARM platforms to multiplatform support. This time,
OMAP gets converted, which is a major step since this is by far the
largest platform in terms of code size. The same thing happens to the
vt8500 platform."
* tag 'multiplatform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
net: cwdavinci_cpdma: export symbols for cpsw
remoteproc: omap: depend on OMAP_MBOX_FWK
[media] davinci: do not include mach/hardware.h
ARM: OMAP2+: Make sure files with omap initcalls include soc.h
ARM: OMAP2+: Include soc.h to drm.c to fix compiling
ARM: OMAP2+: Fix warning for hwspinlock omap_postcore_initcall
ARM: multi_v7_defconfig: add ARCH_ZYNQ
ARM: multi_v7_defconfig: remove unnecessary CONFIG_GPIOLIB
arm: vt8500: Remove remaining mach includes
arm: vt8500: Convert debug-macro.S to be multiplatform friendly
arm: vt8500: Remove single platform Kconfig options
ARM: OMAP2+: Remove now obsolete uncompress.h and debug-macro.S
ARM: OMAP2+: Add minimal support for booting vexpress
ARM: OMAP2+: Enable ARCH_MULTIPLATFORM support
ARM: OMAP2+: Disable code that currently does not work with multiplaform
ARM: OMAP2+: Add multiplatform debug_ll support
ARM: OMAP: Fix dmaengine init for multiplatform
ARM: OMAP: Fix i2c cmdline initcall for multiplatform
ARM: OMAP2+: Use omap initcalls
ARM: OMAP2+: Limit omap initcalls to omap only on multiplatform kernels
Diffstat (limited to 'arch/arm/mach-omap2/soc.h')
-rw-r--r-- | arch/arm/mach-omap2/soc.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index f31d907..092aedd 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h @@ -42,6 +42,9 @@ #undef MULTI_OMAP2 #undef OMAP_NAME +#ifdef CONFIG_ARCH_MULTIPLATFORM +#define MULTI_OMAP2 +#endif #ifdef CONFIG_SOC_OMAP2420 # ifdef OMAP_NAME # undef MULTI_OMAP2 @@ -112,6 +115,11 @@ int omap_type(void); */ unsigned int omap_rev(void); +static inline int soc_is_omap(void) +{ + return omap_rev() != 0; +} + /* * Get the CPU revision for OMAP devices */ @@ -465,5 +473,26 @@ static inline unsigned int omap4_has_ ##feat(void) \ OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON) +/* + * We need to make sure omap initcalls don't run when + * multiplatform kernels are booted on other SoCs. + */ +#define omap_initcall(level, fn) \ +static int __init __used __##fn(void) \ +{ \ + if (!soc_is_omap()) \ + return 0; \ + return fn(); \ +} \ +level(__##fn); + +#define omap_early_initcall(fn) omap_initcall(early_initcall, fn) +#define omap_core_initcall(fn) omap_initcall(core_initcall, fn) +#define omap_postcore_initcall(fn) omap_initcall(postcore_initcall, fn) +#define omap_arch_initcall(fn) omap_initcall(arch_initcall, fn) +#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn) +#define omap_device_initcall(fn) omap_initcall(device_initcall, fn) +#define omap_late_initcall(fn) omap_initcall(late_initcall, fn) + #endif /* __ASSEMBLY__ */ |