From 520075d88060799bb0696f31bae7c337ad69d12b Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Fri, 15 Feb 2019 13:43:49 +0100 Subject: watchdog: add (U)EFI driver This driver is using SetWatchdogTimer() UEFI interface and was tested on iBASE MI991AF Mini-ITX motherboard. Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- common/efi/efi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'common/efi') diff --git a/common/efi/efi.c b/common/efi/efi.c index 1f451a157e..a7b25cbbe2 100644 --- a/common/efi/efi.c +++ b/common/efi/efi.c @@ -367,8 +367,15 @@ efi_status_t efi_main(efi_handle_t image, efi_system_table_t *sys_table) static int efi_core_init(void) { - struct device_d *dev = device_alloc("efi-cs", DEVICE_ID_SINGLE); + struct device_d *dev; + int ret; + + dev = device_alloc("efi-cs", DEVICE_ID_SINGLE); + ret = platform_device_register(dev); + if (ret) + return ret; + dev = device_alloc("efi-wdt", DEVICE_ID_SINGLE); return platform_device_register(dev); } core_initcall(efi_core_init); -- cgit v1.2.3