Michał Żygowski | d627f7b | 2022-10-28 15:44:48 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef SOC_INTEL_COMMON_OC_WDT_H |
| 4 | #define SOC_INTEL_COMMON_OC_WDT_H |
| 5 | |
| 6 | #include <stdbool.h> |
| 7 | |
| 8 | /* |
| 9 | * Starts and reloads the OC watchdog with given timeout. |
| 10 | * |
| 11 | * timeout - Time in seconds before OC watchdog times out. Supported range = 70 - 1024 |
| 12 | */ |
| 13 | void oc_wdt_start(unsigned int timeout); |
| 14 | |
| 15 | /* Reloads the OC watchdog (if enabled) preserving the current settings. */ |
| 16 | void oc_wdt_reload(void); |
| 17 | |
| 18 | /* Disables the OC WDT */ |
| 19 | void oc_wdt_disable(void); |
| 20 | |
| 21 | /* Checks if OC WDT is enabled and returns true if so, otherwise false */ |
| 22 | bool is_oc_wdt_enabled(void); |
| 23 | |
| 24 | /* Returns currently programmed OC watchdog timeout in seconds */ |
| 25 | unsigned int oc_wdt_get_current_timeout(void); |
| 26 | |
| 27 | #endif |