u-boot/arch/arm
Marek Vasut 715e709038 ARM: stm32: Add IWDG handling into PSCI suspend code
In case the IWDG is enabled by either U-Boot or Linux, the IWDG can never
be disabled again. That includes low power states, which means that if the
IWDG is enabled, the SoC would reset itself after a while in suspend via
the IWDG. This is not desired behavior.

It is possible to enable IWDG pre-timeout IRQ which is routed into the EXTI,
and use that IRQ to wake the CPU up before the IWDG timeout is reached and
reset is triggered. This pre-timeout IRQ can be used to reload the WDT and
then suspend the CPU again every once in a while.

Implement this functionality for both IWDG1 and IWDG2 by reading out all
the unmasked IRQs, comparing the list with currently pending IRQs in GICv3:
- If any IRQ is pending and it is NOT IWDG1 or IWDG2 pre-timeout IRQ,
  wake up and let OS handle the IRQs
- If IWDG1 or IWDG2 IRQ is pending and no other IRQ is pending,
  ping the respective IWDG and suspend again

This does not seem to have any adverse impact on power consumption in suspend.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-06-16 11:09:28 +02:00
..
cpu global: Use proper project name U-Boot 2023-06-12 13:24:31 +02:00
dts arm: dts: stm32: Add partitions in flash0 and nand node for stm32mp15xx-dhcom/dhcor 2023-06-16 11:01:16 +02:00
include Xilinx changes for v2023.10-rc1 2023-06-12 16:42:37 -04:00
lib arm64: interrupts: print FAR_ELx on sync exceptions 2023-04-25 15:31:27 -04:00
mach-apple arm: apple: Add initial Apple M2 Pro/Max support 2023-05-30 15:13:44 -04:00
mach-aspeed
mach-at91 include: Remove unused header files 2023-05-31 12:31:47 -04:00
mach-bcm283x
mach-bcmbca
mach-bcmstb
mach-cortina
mach-davinci include: Remove unused header files 2023-05-31 12:31:47 -04:00
mach-exynos
mach-highbank
mach-histb arm: histb: hi3798mv200: add initial support for Hi3798MV200 HC2910-2AGHD05 board 2023-05-03 09:05:24 -04:00
mach-hpe
mach-imx Merge tag v2023.07-rc4 into next 2023-06-12 14:55:33 -04:00
mach-integrator
mach-ipq40xx
mach-k3 Merge tag v2023.07-rc4 into next 2023-06-12 14:55:33 -04:00
mach-keystone include: Remove unused header files 2023-05-31 12:31:47 -04:00
mach-kirkwood
mach-lpc32xx
mach-mediatek
mach-meson
mach-mvebu drivers: fix debug string with fdt_addr_t input 2023-05-06 17:28:18 +08:00
mach-nexell
mach-npcm
mach-octeontx
mach-octeontx2
mach-omap2 Merge tag v2023.07-rc4 into next 2023-06-12 14:55:33 -04:00
mach-orion5x
mach-owl
mach-qemu
mach-rmobile Merge tag v2023.07-rc4 into next 2023-06-12 14:55:33 -04:00
mach-rockchip Merge tag v2023.07-rc4 into next 2023-06-12 14:55:33 -04:00
mach-s5pc1xx
mach-snapdragon
mach-socfpga
mach-sti
mach-stm32
mach-stm32mp ARM: stm32: Add IWDG handling into PSCI suspend code 2023-06-16 11:09:28 +02:00
mach-sunxi sunxi: arm64: boot0.h: runtime check for RVBAR address 2023-04-12 00:17:22 +01:00
mach-tegra
mach-u8500
mach-uniphier arm: uniphier: fix header inclusion guard 2023-05-31 10:11:46 -04:00
mach-versal arm64: versal: Add missing prototypes 2023-06-12 13:25:02 +02:00
mach-versal-net arm64: versal-net: Add support for SPP production version 2023-06-12 13:24:31 +02:00
mach-versatile
mach-zynq
mach-zynqmp arm64: zynqmp: Fix lockstep mode cpu release functionality 2023-06-12 13:25:02 +02:00
mach-zynqmp-r5
thumb1/include/asm/proc-armv
config.mk arm: Centralize fixed register logic 2023-04-25 15:31:27 -04:00
Kconfig arm: add support for Hisilicon HiSTB family SoCs 2023-05-03 09:05:24 -04:00
Kconfig.debug
Makefile arm: add support for Hisilicon HiSTB family SoCs 2023-05-03 09:05:24 -04:00