summaryrefslogtreecommitdiffstats
path: root/commands/smc.c
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/smc.c
parent301893f3a91335e0fa569909cded5b56900ae1cb (diff)
downloadbarebox-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>
Diffstat (limited to 'commands/smc.c')
-rw-r--r--commands/smc.c5
1 files changed, 5 insertions, 0 deletions
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':