feat(st-iwdg): remove unused flags

Remove flags used for configuring watchdog during low power phases.
The configuration to stop watchdog during standby and s2idle is done in
OP-TEE.

Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Change-Id: Ib68d5bf31d7f97791af6b25327b374771b75fd4e
This commit is contained in:
Thomas Bourgoin 2024-04-17 15:19:54 +02:00 committed by Yann Gautier
parent c455c1b766
commit c3ac6ca04e
2 changed files with 2 additions and 27 deletions

View File

@ -33,7 +33,6 @@
struct stm32_iwdg_instance {
uintptr_t base;
unsigned long clock;
uint8_t flags;
};
static struct stm32_iwdg_instance stm32_iwdg[IWDG_MAX_INSTANCE];
@ -111,18 +110,7 @@ int stm32_iwdg_init(void)
iwdg->base = dt_info.base;
iwdg->clock = (unsigned long)dt_info.clock;
/* DT can specify low power cases */
if (fdt_getprop(fdt, node, "stm32,enable-on-stop", NULL) ==
NULL) {
iwdg->flags |= IWDG_DISABLE_ON_STOP;
}
if (fdt_getprop(fdt, node, "stm32,enable-on-standby", NULL) ==
NULL) {
iwdg->flags |= IWDG_DISABLE_ON_STANDBY;
}
/* Explicit list of supported bit flags */
/* Read OTP to know if IWDG is started by hardware or not */
hw_init = stm32_iwdg_get_otp_config(idx);
if ((hw_init & IWDG_HW_ENABLED) != 0) {
@ -131,7 +119,6 @@ int stm32_iwdg_init(void)
idx + 1U);
panic();
}
iwdg->flags |= IWDG_HW_ENABLED;
}
if (dt_info.status == DT_DISABLED) {
@ -140,14 +127,6 @@ int stm32_iwdg_init(void)
continue;
}
if ((hw_init & IWDG_DISABLE_ON_STOP) != 0) {
iwdg->flags |= IWDG_DISABLE_ON_STOP;
}
if ((hw_init & IWDG_DISABLE_ON_STANDBY) != 0) {
iwdg->flags |= IWDG_DISABLE_ON_STANDBY;
}
VERBOSE("IWDG%u found, %ssecure\n", idx + 1U,
((dt_info.status & DT_NON_SECURE) != 0) ?
"non-" : "");
@ -161,8 +140,6 @@ int stm32_iwdg_init(void)
if ((hw_init & IWDG_HW_ENABLED) == 0) {
/* Use default timeout, ignore DT's "timeout-sec" */
stm32_iwdg_start(iwdg);
iwdg->flags |= IWDG_HW_ENABLED;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019, STMicroelectronics - All Rights Reserved
* Copyright (c) 2018-2026, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -10,8 +10,6 @@
#include <stdint.h>
#define IWDG_HW_ENABLED BIT(0)
#define IWDG_DISABLE_ON_STOP BIT(1)
#define IWDG_DISABLE_ON_STANDBY BIT(2)
int stm32_iwdg_init(void);
void stm32_iwdg_refresh(void);