Merge branch 'master' into next
[platform/kernel/u-boot.git] / lib / efi_loader / efi_disk.c
index 819dcb4..e39968a 100644 (file)
@@ -810,3 +810,20 @@ efi_status_t efi_disk_get_device_name(const efi_handle_t handle, char *buf, int
 
        return EFI_SUCCESS;
 }
+
+/**
+ * efi_disks_register() - ensure all block devices are available in UEFI
+ *
+ * The function probes all block devices. As we store UEFI variables on the
+ * EFI system partition this function has to be called before enabling
+ * variable services.
+ */
+efi_status_t efi_disks_register(void)
+{
+       struct udevice *dev;
+
+       uclass_foreach_dev_probe(UCLASS_BLK, dev) {
+       }
+
+       return EFI_SUCCESS;
+}