From: Quentin Schulz <[email protected]> This reverts commit e49c84f7bb7b69a9736e8243665b30b46075ab55.
The args support for the sysreset uclass contains a logic bug. The first sysreset device implementing the request_arg callback will consume the args, not support the specified arg and thus return -EPROTONOSUPPORT which will stop the iteration over all sysreset devices. This is an issue if one has multiple sysreset devices and each with support for different (valid) args. If a sysreset device implements a -dummy argument and another -foo and one calls reset -dummy on the U-Boot CLI, it'll depend on which sysreset device will be attempted first. If it is the one implementing -foo, it'll return it doesn't support the argument with -EPROTONOSUPPORT in which case the device implementing -dummy will never be attempted and instead we'll do a cold reset which is very likely not what's expected. Signed-off-by: Quentin Schulz <[email protected]> --- doc/usage/cmd/reset.rst | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/usage/cmd/reset.rst b/doc/usage/cmd/reset.rst index 79bc8b9deca5..88261293924f 100644 --- a/doc/usage/cmd/reset.rst +++ b/doc/usage/cmd/reset.rst @@ -11,9 +11,7 @@ Synopsis :: - reset - reset -w - reset -edl + reset [-w] Description ----------- @@ -24,12 +22,8 @@ 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. Unsupported - platforms will print an error message but the command will successfully - return (having done nothing). Requires CONFIG_SYSRESET_QCOM_PSCI=y. + Boot to Emergency DownLoad mode on supported Qualcomm platforms. Return value ------------ -- 2.55.0

