[PATCH 1/1] sandbox: make sandbox system reset configurable

Simon Glass sjg at chromium.org
Wed Oct 19 15:18:13 CEST 2022


Hi Heinrich,

On Sun, 16 Oct 2022 at 01:27, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> On 10/15/22 14:04, Michal Suchánek wrote:
> > Hello,
> >
> > On Sat, Oct 15, 2022 at 10:39:19AM +0200, Heinrich Schuchardt wrote:
> >> To test the watchdog system reset we need to disable the default sandbox
> >> system reset.
> >>
> >> The following settings provide the reset command via watchdog on the
> >> sandbox:
> >>
> >>      CONFIG_WDT_GPIO=n
> >>      CONFIG_WDT_SANDBOX=y
> >>      CONFIG_SYSRESET_SANDBOX=n
> >>      CONFIG_SYSRESET_WATCHDOG=y
> >>      CONFIG_SYSRESET_WATCHDOG_AUTO=y
> >
> > Woudn't it be better to make this runtime configurable?
>
> Devices can already be removed using the unbind command and added with
> the bind command again.
>
> You could get into the same state by
>
> * unbinding all sysreset devices and the GPIO watchdog device
> * binding the watchdog sysreset driver
>
> if CONFIG_SYSRESET_WATCHDOG_AUTO=y.
>
> As the watchdog sysreset driver does not support the poweroff command
> enabling CONFIG_SYSRESET_WATCHDOG=y by default is not a good choice.
>
> Actually testing the watchdog sysreset driver is beyond the scope of
> this patch.

Hmmm we don't want to disable it at build time...as Michal says it is
better to disable it at runtime, e.g. with a test flag. We do that in
quite a few cases at the start of tests, to get the behaviour needed
for the test.

Regards,
SImon


More information about the U-Boot mailing list