From a9346b93b4c19003a8b14393811e1eb6063f0ed4 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 19 Aug 2021 11:57:05 +0200 Subject: sandbox: add test of wdt_gpio driver It seems that no other test has claimed gpio_a:7 yet, so use that. The only small wrinkle is modifying the existing wdt test to use uclass_get_device_by_driver() since we now have two UCLASS_WDT instances in play, so it's a little more robust to fetch the device by driver and not merely uclass+index. Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch') diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 962bdbe5567..e91387a81f8 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -793,6 +793,12 @@ }; }; + gpio-wdt { + gpios = <&gpio_a 7 0>; + compatible = "linux,wdt-gpio"; + always-running; + }; + mbox: mbox { compatible = "sandbox,mbox"; #mbox-cells = <1>; -- cgit v1.2.3 From 4171c574721f3790b416b57d6a536cf3238d5849 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Thu, 19 Aug 2021 11:57:06 +0200 Subject: sandbox: add test of wdt-uclass' watchdog_reset() Check that the watchdog_reset() implementation in wdt-uclass behaves as expected: - resets all activated watchdog devices - leaves unactivated/stopped devices alone - that the rate-limiting works, with a per-device threshold Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Signed-off-by: Rasmus Villemoes --- arch/sandbox/dts/test.dts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index e91387a81f8..1399a14929b 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -796,6 +796,7 @@ gpio-wdt { gpios = <&gpio_a 7 0>; compatible = "linux,wdt-gpio"; + hw_margin_ms = <100>; always-running; }; @@ -1278,6 +1279,7 @@ wdt0: wdt@0 { compatible = "sandbox,wdt"; + hw_margin_ms = <200>; }; axi: axi@0 { -- cgit v1.2.3