1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* 3 * Copyright (c) 2018-2022, STMicroelectronics - All Rights Reserved 4 */ 5 6 #ifndef DRIVERS_STM32_IWDG_H 7 #define DRIVERS_STM32_IWDG_H 8 9 #include <stdbool.h> 10 11 /* 12 * struct stm32_iwdg_otp_data - Fuses configuration related to an IWDG 13 * @hw_enabled - IWDDG instance is enabled by early hardware boot stage 14 * @disable_on_stop - IWDG instance freezes when SoC is in STOP mode 15 * @disable_on_standby - IWDG instance freezes when SoC is in STANDBY mode 16 */ 17 struct stm32_iwdg_otp_data { 18 bool hw_enabled; 19 bool disable_on_stop; 20 bool disable_on_standby; 21 }; 22 23 /* 24 * Platform shall implement this function for IWDG instance to retrieve its 25 * OTP/fuse configuration. 26 */ 27 TEE_Result stm32_get_iwdg_otp_config(paddr_t pbase, 28 struct stm32_iwdg_otp_data *otp_data); 29 30 /* Refresh all registered IWDG watchdog instance */ 31 void stm32_iwdg_refresh(void); 32 33 #endif /*DRIVERS_STM32_IWDG_H*/ 34