]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: boot: fix edl being shown when not supported
authorQuentin Schulz <quentin.schulz@cherry.de>
Thu, 7 May 2026 15:04:05 +0000 (17:04 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 18 May 2026 06:37:13 +0000 (08:37 +0200)
edl is implemented in the sysreset_ops.request_arg callback of the
qcom-psci sysreset driver. That callback is only called from
sysreset_request_arg() which is compiled only when
CONFIG_SYSRESET_CMD_RESET_ARGS=y.

Therefore, only show the edl option if that symbol is enabled.

It is in a separate if block because any option but -w will only be
handled when CONFIG_SYSRESET_CMD_RESET_ARGS=y as seen with the
implementation in do_reset() in drivers/sysreset/sysreset-uclass.c.

Fixes: ef06c5d76ff4 ("cmd: boot: Add '-edl' option to reset command documentation")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/boot.c

index d80f9d8c05ddbcc5c8d6774fc49815d8817f70d9..29cdf4a9a81ad3f8036ec4841d864c5b79d1526e 100644 (file)
@@ -60,8 +60,11 @@ U_BOOT_CMD(
        reset, 2, 0,    do_reset,
        "Perform RESET of the CPU",
        "- cold boot without level specifier\n"
+#if IS_ENABLED(CONFIG_SYSRESET_CMD_RESET_ARGS)
+// All options handled by sysreset drivers via their sysreset_ops.request_arg callback
 #ifdef CONFIG_SYSRESET_QCOM_PSCI
        "reset -edl - Boot to Emergency DownLoad mode\n"
+#endif
 #endif
        "reset -w - warm reset if implemented"
 );