All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] sandbox: enable testing SYSRESET_WATCHDOG
@ 2021-11-02 18:44 Heinrich Schuchardt
  2021-11-02 18:44 ` [PATCH v2 1/2] test/dm: fix watchdog test Heinrich Schuchardt
  2021-11-02 18:44 ` [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now() Heinrich Schuchardt
  0 siblings, 2 replies; 7+ messages in thread
From: Heinrich Schuchardt @ 2021-11-02 18:44 UTC (permalink / raw)
  To: Simon Glass; +Cc: u-boot, Heinrich Schuchardt

With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system
reset. To make this work calling sandbox_wdt_expire_now() must lead to a
reset.

Further we need CONFIG_WDT_GPIO=n to actually call the right watchdog.
Adjust the watchdog test to avoid a build error.

With this change we can test the development suggested in

  [PATCH 0/4] Improved sysreset/watchdog uclass integration
  https://lists.denx.de/pipermail/u-boot/2021-August/458656.html

v2:
	move test changes to Makefile

Heinrich Schuchardt (2):
  test/dm: fix watchdog test
  sandbox: fix sandbox_wdt_expire_now()

 drivers/watchdog/sandbox_wdt.c | 1 +
 test/dm/Makefile               | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.32.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] test/dm: fix watchdog test
  2021-11-02 18:44 [PATCH v2 0/2] sandbox: enable testing SYSRESET_WATCHDOG Heinrich Schuchardt
@ 2021-11-02 18:44 ` Heinrich Schuchardt
  2021-11-05  2:01   ` Simon Glass
  2021-11-14  0:34   ` Simon Glass
  2021-11-02 18:44 ` [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now() Heinrich Schuchardt
  1 sibling, 2 replies; 7+ messages in thread
From: Heinrich Schuchardt @ 2021-11-02 18:44 UTC (permalink / raw)
  To: Simon Glass; +Cc: u-boot, Heinrich Schuchardt

For successful execution of the watchdog test we need both the GPIO as well
as the SANDBOX watchdog.

Avoid a build failure for CONFIG_WDT_GPIO=n.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	move changes to Makefile
---
 test/dm/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/dm/Makefile b/test/dm/Makefile
index 7de013f636..548649f8e8 100644
--- a/test/dm/Makefile
+++ b/test/dm/Makefile
@@ -106,6 +106,8 @@ obj-$(CONFIG_TIMER) += timer.o
 obj-$(CONFIG_DM_USB) += usb.o
 obj-$(CONFIG_DM_VIDEO) += video.o
 obj-$(CONFIG_VIRTIO_SANDBOX) += virtio.o
-obj-$(CONFIG_WDT) += wdt.o
+ifeq ($(CONFIG_WDT_GPIO)$(CONFIG_WDT_SANDBOX),yy)
+obj-y += wdt.o
+endif
 endif
 endif # !SPL
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now()
  2021-11-02 18:44 [PATCH v2 0/2] sandbox: enable testing SYSRESET_WATCHDOG Heinrich Schuchardt
  2021-11-02 18:44 ` [PATCH v2 1/2] test/dm: fix watchdog test Heinrich Schuchardt
@ 2021-11-02 18:44 ` Heinrich Schuchardt
  2021-11-05  2:01   ` Simon Glass
  2021-11-14  0:34   ` Simon Glass
  1 sibling, 2 replies; 7+ messages in thread
From: Heinrich Schuchardt @ 2021-11-02 18:44 UTC (permalink / raw)
  To: Simon Glass; +Cc: u-boot, Heinrich Schuchardt

With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system
reset.

To make this work calling sandbox_wdt_expire_now() must lead to a reset.

With this change we can test the development suggested in

  [PATCH 0/4] Improved sysreset/watchdog uclass integration
  https://lists.denx.de/pipermail/u-boot/2021-August/458656.html

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	no change
---
 drivers/watchdog/sandbox_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/sandbox_wdt.c b/drivers/watchdog/sandbox_wdt.c
index e05d82789f..535614f04d 100644
--- a/drivers/watchdog/sandbox_wdt.c
+++ b/drivers/watchdog/sandbox_wdt.c
@@ -39,6 +39,7 @@ static int sandbox_wdt_reset(struct udevice *dev)
 static int sandbox_wdt_expire_now(struct udevice *dev, ulong flags)
 {
 	sandbox_wdt_start(dev, 1, flags);
+	sandbox_reset();
 
 	return 0;
 }
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] test/dm: fix watchdog test
  2021-11-02 18:44 ` [PATCH v2 1/2] test/dm: fix watchdog test Heinrich Schuchardt
@ 2021-11-05  2:01   ` Simon Glass
  2021-11-14  0:34   ` Simon Glass
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2021-11-05  2:01 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot

On Tue, 2 Nov 2021 at 12:44, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> For successful execution of the watchdog test we need both the GPIO as well
> as the SANDBOX watchdog.
>
> Avoid a build failure for CONFIG_WDT_GPIO=n.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         move changes to Makefile
> ---
>  test/dm/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now()
  2021-11-02 18:44 ` [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now() Heinrich Schuchardt
@ 2021-11-05  2:01   ` Simon Glass
  2021-11-14  0:34   ` Simon Glass
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2021-11-05  2:01 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot

On Tue, 2 Nov 2021 at 12:44, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system
> reset.
>
> To make this work calling sandbox_wdt_expire_now() must lead to a reset.
>
> With this change we can test the development suggested in
>
>   [PATCH 0/4] Improved sysreset/watchdog uclass integration
>   https://lists.denx.de/pipermail/u-boot/2021-August/458656.html
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         no change
> ---
>  drivers/watchdog/sandbox_wdt.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now()
  2021-11-02 18:44 ` [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now() Heinrich Schuchardt
  2021-11-05  2:01   ` Simon Glass
@ 2021-11-14  0:34   ` Simon Glass
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2021-11-14  0:34 UTC (permalink / raw)
  To: Simon Glass; +Cc: u-boot, Heinrich Schuchardt

On Tue, 2 Nov 2021 at 12:44, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system
> reset.
>
> To make this work calling sandbox_wdt_expire_now() must lead to a reset.
>
> With this change we can test the development suggested in
>
>   [PATCH 0/4] Improved sysreset/watchdog uclass integration
>   https://lists.denx.de/pipermail/u-boot/2021-August/458656.html
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         no change
> ---
>  drivers/watchdog/sandbox_wdt.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] test/dm: fix watchdog test
  2021-11-02 18:44 ` [PATCH v2 1/2] test/dm: fix watchdog test Heinrich Schuchardt
  2021-11-05  2:01   ` Simon Glass
@ 2021-11-14  0:34   ` Simon Glass
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Glass @ 2021-11-14  0:34 UTC (permalink / raw)
  To: Simon Glass; +Cc: u-boot, Heinrich Schuchardt

On Tue, 2 Nov 2021 at 12:44, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> For successful execution of the watchdog test we need both the GPIO as well
> as the SANDBOX watchdog.
>
> Avoid a build failure for CONFIG_WDT_GPIO=n.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         move changes to Makefile
> ---
>  test/dm/Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-14  0:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02 18:44 [PATCH v2 0/2] sandbox: enable testing SYSRESET_WATCHDOG Heinrich Schuchardt
2021-11-02 18:44 ` [PATCH v2 1/2] test/dm: fix watchdog test Heinrich Schuchardt
2021-11-05  2:01   ` Simon Glass
2021-11-14  0:34   ` Simon Glass
2021-11-02 18:44 ` [PATCH v2 2/2] sandbox: fix sandbox_wdt_expire_now() Heinrich Schuchardt
2021-11-05  2:01   ` Simon Glass
2021-11-14  0:34   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.