clk: rk3399: Fix eMMC get_clk reg offset
[oweals/u-boot.git] / lib / efi / efi.c
index 81af27caab12ba95dc5a6792cfdb10ed07d52046..0c16a5fdd38a983e23c06c998aa782319c29e971 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Google, Inc
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * EFI information obtained here:
  * http://wiki.phoenix.com/wiki/index.php/EFI_BOOT_SERVICES
  *
 #include <common.h>
 #include <debug_uart.h>
 #include <errno.h>
+#include <malloc.h>
 #include <linux/err.h>
 #include <linux/types.h>
 #include <efi.h>
 #include <efi_api.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 /*
  * Unfortunately we cannot access any code outside what is built especially
  * for the stub. lib/string.c is already being built for the U-Boot payload
@@ -56,7 +54,7 @@ void efi_puts(struct efi_priv *priv, const char *str)
 int efi_init(struct efi_priv *priv, const char *banner, efi_handle_t image,
             struct efi_system_table *sys_table)
 {
-       efi_guid_t loaded_image_guid = LOADED_IMAGE_PROTOCOL_GUID;
+       efi_guid_t loaded_image_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
        struct efi_boot_services *boot = sys_table->boottime;
        struct efi_loaded_image *loaded_image;
        int ret;
@@ -72,7 +70,7 @@ int efi_init(struct efi_priv *priv, const char *banner, efi_handle_t image,
        efi_putc(priv, ' ');
 
        ret = boot->open_protocol(priv->parent_image, &loaded_image_guid,
-                                 (void **)&loaded_image, &priv->parent_image,
+                                 (void **)&loaded_image, priv->parent_image,
                                  NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
        if (ret) {
                efi_puts(priv, "Failed to get loaded image protocol\n");