[PATCH v6 2/5] drivers: sysreset: Add sysreset op that can take arguments

Varadarajan Narayanan varadarajan.narayanan at oss.qualcomm.com
Mon Feb 16 06:31:02 CET 2026


On Fri, Feb 13, 2026 at 01:20:10PM -0700, Simon Glass wrote:
[ . . . ]

> > > > > I haven't been following this, but what sort of args are you planning to pass?
> > > >
> > > > As of now, an argument to indicate reboot to emergency download mode.
> > >
> > > So how about adding a struct in sysreset.h where you can include a
> > > flag word and create a single flag for your case? We should be able to
> > > handle reset without the cmdline being enabled.
> > >
> > > There are other cases where this would be useful, e.g. an EFI app
> > > rebooting into setup boot.
> >
> > Previously, i.e. v5 [1] didn't have SYSRESET_CMD_RESET_ARGS config
> > option. This was added to avoid bloat code size for platforms that will
> > not need this. Please see [2]
>
> Sure, but you are adding a new method, so you could make it take a new
> struct instead of the string list, still behind your Kconfig option.

Sure.

You want 'request_arg' function pointer to take a structure instead of
'char * const argv[]'. Is this understanding correct?

If yes, this string list is what was given in the command line. And is
passed to the implementation specific handler.

	Command line -> do_reset -> sysreset_walk_arg -> *request_arg

The implementation specific handler can interpret the argv[] as
applicable to itself. Not sure how to convert/parse this to a struct
that can be used by EFI app. Am I missing something. Please advice.

Thanks
Varada

> > 1 - https://lore.kernel.org/u-boot/20260113103840.1948029-3-varadarajan.narayanan@oss.qualcomm.com/
> > 2 - https://lore.kernel.org/u-boot/20260119170701.GD3416603@bill-the-cat/


More information about the U-Boot mailing list