On Wed, Jun 11, 2025 at 01:55:32PM +0200, Casey Connolly wrote: > Hi Varadarajan, > > On 5/7/25 09:07, Varadarajan Narayanan wrote: > > Using the 'reboot edl' command in Linux, the platform can reboot to the > > Emergency Download mode. Implement the same for U-Boot. > > > > v3: * Introduce a sysreset op that will pass down the 'reset' command > > arguments to registered handlers > > * Handle 'reset to edl' alone in qcom-psci driver > > > > v2: * Rebased to recent sources > > * Dropped the first patch as it is not applicable anymore > > * Bind the new driver from psci driver > > > Sorry for the late reply. > > This really needs some associated documentation, at least adding the edl arg > to doc/usage/cmd/reset.rst and the help output in cmd/boot.c should describe > the edl arg if CONFIG_SYSRESET_QCOM_PSCI is enabled.
ok. > > it also doesn't build? > > ../drivers/sysreset/sysreset-uclass.c: In function 'sysreset_walk_arg': > ../drivers/sysreset/sysreset-uclass.c:93:63: error: passing argument 3 of > 'sysreset_request_arg' from incompatible pointer type > [-Wincompatible-pointer-types] > 93 | ret = sysreset_request_arg(dev, argc, argv); > | ^~~~ > | | > | char * const* > ../drivers/sysreset/sysreset-uclass.c:35:69: note: expected 'const char **' > but argument is of type 'char * const*' > 35 | int sysreset_request_arg(struct udevice *dev, int argc, const char > *argv[]) ok. > ignoring that for a sec, I'm a bit worried still about how this behaves on > boards that don't implement this psci call, on sdm845 for example we just > hang. > > I think psci_system_reset2() should be adjusted to time out (though I can't > imagine a psci implementation that would return execution to el1 during the > reset, so maybe the timeout isn't even needed?) and return an error if the > reset didn't happen. Would checking if the system-reset2 function is implemented in PSCI and handling appropriately similar to [1] be ok? Please let me know. > Then qcom_psci_sysreset_request_arg() should print some useful error message > ("reset2 not supported on this platform, reset to edl failed") and bubble up > the error code to abort the reset entirely. If the function is not implemented will print a message and bubble up -EPROTONOSUPPORT. 1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/psci/psci.c#n554 Thanks Varada