[PATCH v6 2/5] drivers: sysreset: Add sysreset op that can take arguments
Varadarajan Narayanan
varadarajan.narayanan at oss.qualcomm.com
Tue Feb 17 05:26:52 CET 2026
On Mon, Feb 16, 2026 at 09:29:06AM -0600, Tom Rini wrote:
> On Mon, Feb 16, 2026 at 11:01:02AM +0530, Varadarajan Narayanan wrote:
> > 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.
>
> Varada, do you think this suggestion is taking things in a useful
> direction? It's unclear to me at this point if what Simon suggested is
> going to provide something meaningfully more clear / useful or not.
At this point, for my case, it seems not needed. That is why trying to
understand his perspective to get better clarity and arrive at a
consensus.
Thanks
Varada
More information about the U-Boot
mailing list