diff options
author | Tom Rini <trini@konsulko.com> | 2024-10-23 08:33:56 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-23 08:33:56 -0600 |
commit | 7af813341d5df064aeee764c31ffb50ffcdf4eb6 (patch) | |
tree | 54b73688ebc3a841f0d347e6f4f3da84aaa294b4 /test | |
parent | 392ff1449f7d30cc48fd4d17320d05882cd68f2e (diff) | |
parent | ed3410ee6049a7683718e8255575ad55ee1bdefd (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-watchdog
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=378&view=results
* watchdog: gpio_wdt: add support for stoppable devices (Rasmus)
* watchdog: Add DaVinci's watchdog support (Bastien)
* cyclic: disentangling cyclic API from schedule() (Rasmus)
* watchdog: introduce separate SPL symbol for WDT_GPIO (Rasmus)
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/wdt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/dm/wdt.c b/test/dm/wdt.c index 541bcba1b53..bef29591d5a 100644 --- a/test/dm/wdt.c +++ b/test/dm/wdt.c @@ -3,7 +3,6 @@ * Copyright 2017 Google, Inc */ -#include <cyclic.h> #include <dm.h> #include <time.h> #include <wdt.h> @@ -14,6 +13,7 @@ #include <test/test.h> #include <test/ut.h> #include <linux/delay.h> +#include <u-boot/schedule.h> #include <watchdog.h> /* Test that watchdog driver functions are called */ @@ -71,7 +71,7 @@ static int dm_test_wdt_gpio_toggle(struct unit_test_state *uts) ut_assertok(wdt_reset(wdt)); ut_asserteq(val, sandbox_gpio_get_value(gpio, offset)); - ut_asserteq(-ENOSYS, wdt_stop(wdt)); + ut_asserteq(-EOPNOTSUPP, wdt_stop(wdt)); return 0; } @@ -103,7 +103,7 @@ static int dm_test_wdt_gpio_level(struct unit_test_state *uts) ut_assertok(wdt_reset(wdt)); ut_asserteq(val, sandbox_gpio_get_value(gpio, offset)); - ut_asserteq(-ENOSYS, wdt_stop(wdt)); + ut_asserteq(-EOPNOTSUPP, wdt_stop(wdt)); return 0; } @@ -131,7 +131,7 @@ static int dm_test_wdt_watchdog_reset(struct unit_test_state *uts) /* Neither device should be "started", so watchdog_reset() should be a no-op. */ reset_count = state->wdt.reset_count; val = sandbox_gpio_get_value(gpio, offset); - cyclic_run(); + schedule(); ut_asserteq(reset_count, state->wdt.reset_count); ut_asserteq(val, sandbox_gpio_get_value(gpio, offset)); @@ -141,19 +141,19 @@ static int dm_test_wdt_watchdog_reset(struct unit_test_state *uts) /* Make sure both devices have just been pinged. */ timer_test_add_offset(100); - cyclic_run(); + schedule(); reset_count = state->wdt.reset_count; val = sandbox_gpio_get_value(gpio, offset); /* The gpio watchdog should be pinged, the sandbox one not. */ timer_test_add_offset(30); - cyclic_run(); + schedule(); ut_asserteq(reset_count, state->wdt.reset_count); ut_asserteq(!val, sandbox_gpio_get_value(gpio, offset)); /* After another ~30ms, both devices should get pinged. */ timer_test_add_offset(30); - cyclic_run(); + schedule(); ut_asserteq(reset_count + 1, state->wdt.reset_count); ut_asserteq(val, sandbox_gpio_get_value(gpio, offset)); |