The smc command can be useful whenever PSCI is used, regardless of whether barebox provides the secure monitor or not. Have it depend on ARM_SMCCC instead. Signed-off-by: Ahmad Fatoum <ahmad@xxxxxx> --- commands/Kconfig | 2 +- commands/smc.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/commands/Kconfig b/commands/Kconfig index 08b3af8b20f2..7784966282ac 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -1869,7 +1869,7 @@ config CMD_POWEROFF config CMD_SMC bool - depends on ARM_PSCI + depends on ARM_SMCCC prompt "PSCI test command" default CONFIG_ARM_PSCI_DEBUG help diff --git a/commands/smc.c b/commands/smc.c index 997103676eba..84102f3249bc 100644 --- a/commands/smc.c +++ b/commands/smc.c @@ -97,6 +97,11 @@ static int do_smc(int argc, char *argv[]) while ((opt = getopt(argc, argv, "nic")) > 0) { switch (opt) { case 'n': + if (!IS_ENABLED(CONFIG_ARM_SECURE_MONITOR)) { + printf("secure monitor support not compiled in\n"); + return COMMAND_ERROR; + } + armv7_secure_monitor_install(); break; case 'i': -- 2.20.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox