diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2019-11-15 08:52:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-11-19 11:57:25 +0100 |
commit | b3f10ae22d46b48ffb62ce12dd9dfebb55c8a278 (patch) | |
tree | ef97c9ffd2000516f873fe290fd40929d34537b4 | |
parent | 301893f3a91335e0fa569909cded5b56900ae1cb (diff) | |
download | barebox-b3f10ae22d46b48ffb62ce12dd9dfebb55c8a278.tar.gz barebox-b3f10ae22d46b48ffb62ce12dd9dfebb55c8a278.tar.xz |
commands: smc: make command usable when ARM_PSCI is undefined
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@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | commands/Kconfig | 2 | ||||
-rw-r--r-- | commands/smc.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/commands/Kconfig b/commands/Kconfig index 08b3af8b20..7784966282 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 997103676e..84102f3249 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': |