summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2019-11-15 08:52:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-19 11:57:25 +0100
commitb3f10ae22d46b48ffb62ce12dd9dfebb55c8a278 (patch)
treeef97c9ffd2000516f873fe290fd40929d34537b4 /commands
parent301893f3a91335e0fa569909cded5b56900ae1cb (diff)
downloadbarebox-b3f10ae22d46b48ffb62ce12dd9dfebb55c8a278.tar.gz
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>
Diffstat (limited to 'commands')
-rw-r--r--commands/Kconfig2
-rw-r--r--commands/smc.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/commands/Kconfig b/commands/Kconfig
index 08b3af8..7784966 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 9971036..84102f3 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':