]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPlatformPkg/SP805WatchdogDxe: switch to interrupt mode
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 18 Dec 2018 13:10:12 +0000 (14:10 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 20 Dec 2018 11:41:21 +0000 (12:41 +0100)
commit5afabd5ec373f1e37e9b6cdd85b68e08e8f016fb
treeba71f92221e852e82b8345c93c3ffb445b9c024c
parente3fa3d83e7c7e8830b31c9d916c0206a71bf2b48
ArmPlatformPkg/SP805WatchdogDxe: switch to interrupt mode

The SP805 watchdog driver doesn't implement the PI watchdog protocol
fully, but always simply resets the system if the watchdog time runs
out.

However, the hardware does support the intended usage model, as long
as the SP805 is wired up correctly. So let's implement interrupt based
mode involving a handler that is registered by the DXE core and invoked
when the watchdog runs out. In the interrupt handler, we invoke the
notify function if one was registered, before calling the ResetSystem()
runtime service (as per the UEFI spec)

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/ArmPlatformPkg.dec
ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf