diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2019-11-06 11:21:46 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-11-07 08:08:24 +0100 |
commit | 9efa1f8bdcc220be11bb94491b9fc706831a23a7 (patch) | |
tree | 116c0d38f618a68b2a6e0c6313af78712d88a061 /arch/arm/cpu/psci.c | |
parent | b64f035f7caaa90bf716bd3ccd95a67fd2085daf (diff) | |
download | barebox-9efa1f8bdcc220be11bb94491b9fc706831a23a7.tar.gz barebox-9efa1f8bdcc220be11bb94491b9fc706831a23a7.tar.xz |
ARM: psci: wire in smc command help
The smc command has a help defined, but unused. Wire it in, so
help smc and smc -invalidoption work as expected.
While at it, remove the unimplemented -z option. It's unneeded,
because -c turns off the CPU after starting it again already.
Also it seems it's not implementable without interprocessor communication,
which is probably overkill here.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/psci.c')
-rw-r--r-- | arch/arm/cpu/psci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c index 8c5043d83c..22ce1dfd0e 100644 --- a/arch/arm/cpu/psci.c +++ b/arch/arm/cpu/psci.c @@ -291,7 +291,10 @@ static int do_smc(int argc, char *argv[]) .a3 = 0xdeadbee3, }; - while ((opt = getopt(argc, argv, "nicz")) > 0) { + if (argc < 2) + return COMMAND_ERROR_USAGE; + + while ((opt = getopt(argc, argv, "nic")) > 0) { switch (opt) { case 'n': armv7_secure_monitor_install(); @@ -321,7 +324,6 @@ BAREBOX_CMD_HELP_TEXT("Options:") BAREBOX_CMD_HELP_OPT ("-n", "Install secure monitor and switch to nonsecure mode") BAREBOX_CMD_HELP_OPT ("-i", "Show information about installed PSCI version") BAREBOX_CMD_HELP_OPT ("-c", "Start secondary CPU core") -BAREBOX_CMD_HELP_OPT ("-z", "Turn off secondary CPU core") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(smc) |