diff options
author | Nishanth Menon <nm@ti.com> | 2013-06-26 10:39:47 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-07-04 08:10:51 -0400 |
commit | 2abc75a8c52af5e9cd32223554e6071e07b44559 (patch) | |
tree | 644cc1683ac6aa73506dad8a1a01fb8050505f6d /arch/arm | |
parent | b46355a920a3dbdce7365d2e39eefd6c7b87c22a (diff) |
ARM: scu: provide inline dummy functions when SCU is not present
On platforms such as Cortex-A15 based OMAP5, SCU is not used, however
since much code is shared between Cortex-A9 based OMAP4 (which uses
SCU) and OMAP5, It does help to have inline functions returning error
values when SCU is not present on the platform.
arch/arm/mach-omap2/omap-smp.c which is common between OMAP4 and 5
handles the SCU usage only for OMAP4.
This fixes the following build failure with OMAP5 only build:
arch/arm/mach-omap2/built-in.o: In function `omap4_smp_init_cpus':
arch/arm/mach-omap2/omap-smp.c:185: undefined reference to `scu_get_core_count'
arch/arm/mach-omap2/built-in.o: In function `omap4_smp_prepare_cpus':
arch/arm/mach-omap2/omap-smp.c:211: undefined reference to `scu_enable'
Reported-by: Pekon Gupta <pekon@ti.com>
Reported-by: Vincent Stehlé <v-stehle@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/smp_scu.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/include/asm/smp_scu.h b/arch/arm/include/asm/smp_scu.h index 18d169373612..0393fbab8dd5 100644 --- a/arch/arm/include/asm/smp_scu.h +++ b/arch/arm/include/asm/smp_scu.h | |||
@@ -23,10 +23,21 @@ static inline unsigned long scu_a9_get_base(void) | |||
23 | return pa; | 23 | return pa; |
24 | } | 24 | } |
25 | 25 | ||
26 | #ifdef CONFIG_HAVE_ARM_SCU | ||
26 | unsigned int scu_get_core_count(void __iomem *); | 27 | unsigned int scu_get_core_count(void __iomem *); |
27 | int scu_power_mode(void __iomem *, unsigned int); | 28 | int scu_power_mode(void __iomem *, unsigned int); |
29 | #else | ||
30 | static inline unsigned int scu_get_core_count(void __iomem *scu_base) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | static inline int scu_power_mode(void __iomem *scu_base, unsigned int mode) | ||
35 | { | ||
36 | return -EINVAL; | ||
37 | } | ||
38 | #endif | ||
28 | 39 | ||
29 | #ifdef CONFIG_SMP | 40 | #if defined(CONFIG_SMP) && defined(CONFIG_HAVE_ARM_SCU) |
30 | void scu_enable(void __iomem *scu_base); | 41 | void scu_enable(void __iomem *scu_base); |
31 | #else | 42 | #else |
32 | static inline void scu_enable(void __iomem *scu_base) {} | 43 | static inline void scu_enable(void __iomem *scu_base) {} |