Hi Quentin,

On 2026-05-07T15:04:04, Quentin Schulz <[email protected]> wrote:
> doc: usage: cmd: reset: specify when the -edl option is available
>
> The option is only available when CONFIG_SYSRESET_QCOM_PSCI is enabled,
> so let's make that explicit in the boot cmd documentation.
>
> Due to the implementation in drivers/sysreset/sysreset-uclass.c
> do_reset() function, all options to the reset command are passed to all
> sysreset drivers' sysreset_ops.request_arg callback (including -w) which
> is only available when CONFIG_SYSRESET_CMD_RESET_ARGS=y. -w, however,
> works also without this option.
>
> Fixes: ef06c5d76ff4 ("cmd: boot: Add '-edl' option to reset command 
> documentation")
> Signed-off-by: Quentin Schulz <[email protected]>
>
> doc/usage/cmd/reset.rst | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

nits below

> diff --git a/doc/usage/cmd/reset.rst b/doc/usage/cmd/reset.rst
> @@ -22,8 +24,12 @@ DDR and peripherals, on some boards also resets external 
> PMIC.
>  -w
>      Do WARM reset: reset CPU but keep peripheral/DDR/PMIC active.
>
> +All other options require CONFIG_SYSRESET_CMD_RESET_ARGS=y.
> +
>  -edl
> -    Boot to Emergency DownLoad mode on supported Qualcomm platforms.
> +    Boot to Emergency DownLoad mode on supported Qualcomm platforms. 
> Unsupported
> +    platforms will print an error message but the command will successfully
> +    return (having done nothing).

When sysreset_walk_arg() returns anything other than -EINPROGRESS
(e.g. -EPROTONOSUPPORT from qcom_psci_sysreset_request_arg(), or
-ENOSYS when CONFIG_SYSRESET_QCOM_PSCI is not enabled), execution
falls through to sysreset_walk_halt(reset_type) with reset_type still
SYSRESET_COLD

So 'reset -edl' on an unsupported platform actually performs a cold
reset (or hang() if no driver implements it).

> -    reset [-w]
> +    reset
> +    reset -w
> +    reset -edl

nit: I would suggest 'reset [-w | -edl]'

Regards,
Simon

Reply via email to