stm32mp1: add watchdog support
authorYann Gautier <yann.gautier@st.com>
Tue, 4 Jun 2019 16:06:34 +0000 (18:06 +0200)
committerYann Gautier <yann.gautier@st.com>
Mon, 2 Sep 2019 15:25:08 +0000 (17:25 +0200)
commit73680c230f8503a8e0f625834bc987b90e065b03
treea4894bbb432668d2e5229c3659b6a310881fa31a
parenta5ac37e7a60e1e087e385b20fd5614061307e23a
stm32mp1: add watchdog support

Introduce driver for STM32 IWDG peripheral (Independent Watchdog).
It is configured according to device tree content and should be enabled
from there.
The watchdog is not started by default. It can be started after an HW
reset if the dedicated OTP is fused.

The watchdog also needs to be frozen if a debugger is attached.
This is done by configuring the correct bits in DBGMCU.
This configuration is allowed by checking BSEC properties.

An increase of BL2 size is also required when adding this new code.

Change-Id: Ide7535d717885ce2f9c387cf17afd8b5607f3e7f
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
drivers/st/iwdg/stm32_iwdg.c [new file with mode: 0644]
include/drivers/st/stm32_iwdg.h [new file with mode: 0644]
plat/st/common/include/stm32mp_common.h
plat/st/stm32mp1/bl2_plat_setup.c
plat/st/stm32mp1/include/stm32mp1_dbgmcu.h [new file with mode: 0644]
plat/st/stm32mp1/platform.mk
plat/st/stm32mp1/sp_min/sp_min_setup.c
plat/st/stm32mp1/stm32mp1_dbgmcu.c [new file with mode: 0644]
plat/st/stm32mp1/stm32mp1_def.h
plat/st/stm32mp1/stm32mp1_private.c