Skip to content

Commit 51c22d7

Browse files
committed
ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set
Recent omap changes added runtime checks to use omap_smccc_smc() when optee is configured in dts. As the omap-secure code can be built for ARMv6 only without ARMv7 and use custom smc calls, we now get a build error: omap-secure.c:(.text+0x94): undefined reference to `__arm_smccc_smc' As there secure calls are not used for ARMv6, we should not build secure-common, and not call omap_secure_init() for omap2. Fixes: c37baa0 ("ARM: OMAP2+: Fix undefined reference to omap_secure_init") Reported-by: kbuild test robot <[email protected]> Cc: Aaro Koskinen <[email protected]> Cc: Andrew F. Davis <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Rob Herring <[email protected]> Cc: Russell King <[email protected]> Cc: Steven Price <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 5267244 commit 51c22d7

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

arch/arm/mach-omap2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ hwmod-common = omap_hwmod.o omap_hwmod_reset.o \
1616
clock-common = clock.o
1717
secure-common = omap-smc.o omap-secure.o
1818

19-
obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
19+
obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
2020
obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
2121
obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common)
2222
obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common) $(secure-common)

arch/arm/mach-omap2/io.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@ void __init omap2420_init_early(void)
431431
omap_hwmod_init_postsetup();
432432
omap_clk_soc_init = omap2420_dt_clk_init;
433433
rate_table = omap2420_rate_table;
434-
omap_secure_init();
435434
}
436435

437436
void __init omap2420_init_late(void)
@@ -456,7 +455,6 @@ void __init omap2430_init_early(void)
456455
omap_hwmod_init_postsetup();
457456
omap_clk_soc_init = omap2430_dt_clk_init;
458457
rate_table = omap2430_rate_table;
459-
omap_secure_init();
460458
}
461459

462460
void __init omap2430_init_late(void)

0 commit comments

Comments
 (0)