diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2022-10-21 12:01:57 +0900 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-11-06 10:50:04 +0100 |
commit | 023d9c93932cd0106fb921290c6128705343a6da (patch) | |
tree | 6c716affe83fd8ed5d9f78286790abd0a026e4df /lib/efi_loader/efi_setup.c | |
parent | 77b5c4a5b1dcc6dafde116bfdd66f769769a0aeb (diff) |
efi_loader: remove CONFIG_EFI_SETUP_EARLY
Since the commit a9bf024b2933 ("efi_loader: disk: a helper function to
create efi_disk objects from udevice"), CONFIG_EFI_SETUP_EARLY option is
by default on and will never be turned off.
So just remove this option.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib/efi_loader/efi_setup.c')
-rw-r--r-- | lib/efi_loader/efi_setup.c | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index e40f64fd0e..5437641135 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -175,16 +175,15 @@ static efi_status_t efi_init_os_indications(void) } /** - * __efi_init_early() - handle initialization at early stage + * efi_init_early() - handle initialization at early stage * - * This function is called in efi_init_obj_list() only if - * !CONFIG_EFI_SETUP_EARLY. + * expected to be called in board_init_r(). * * Return: status code */ -static efi_status_t __efi_init_early(void) +int efi_init_early(void) { - efi_status_t ret = EFI_SUCCESS; + efi_status_t ret; /* Allow unaligned memory access */ allow_unaligned(); @@ -200,29 +199,15 @@ static efi_status_t __efi_init_early(void) /* Initialize EFI driver uclass */ ret = efi_driver_init(); -out: - return ret; -} - -/** - * efi_init_early() - handle initialization at early stage - * - * external version of __efi_init_early(); expected to be called in - * board_init_r(). - * - * Return: status code - */ -int efi_init_early(void) -{ - efi_status_t ret; + if (ret != EFI_SUCCESS) + goto out; - ret = __efi_init_early(); - if (ret != EFI_SUCCESS) { - /* never re-init UEFI subsystem */ - efi_obj_list_initialized = ret; - return -1; - } return 0; +out: + /* never re-init UEFI subsystem */ + efi_obj_list_initialized = ret; + + return -1; } /** @@ -238,12 +223,6 @@ efi_status_t efi_init_obj_list(void) if (efi_obj_list_initialized != OBJ_LIST_NOT_INITIALIZED) return efi_obj_list_initialized; - if (!IS_ENABLED(CONFIG_EFI_SETUP_EARLY)) { - ret = __efi_init_early(); - if (ret != EFI_SUCCESS) - goto out; - } - /* Set up console modes */ efi_setup_console_size(); |