summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2019-02-15 13:43:49 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-18 14:25:05 +0100
commit520075d88060799bb0696f31bae7c337ad69d12b (patch)
treeb3c82dd5174879a1cf45278b4b8de1de25a8742b /common
parent8b7d51a5854f199371be60fef91d32a24e2771cc (diff)
downloadbarebox-520075d88060799bb0696f31bae7c337ad69d12b.tar.gz
barebox-520075d88060799bb0696f31bae7c337ad69d12b.tar.xz
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 <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/efi/efi.c9
1 files changed, 8 insertions, 1 deletions
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);