From 9b5e6396bff5ede22f880c38915da5538e8bd117 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 30 Aug 2018 15:43:43 -0600 Subject: efi_loader: simplify ifdefs Use CONFIG_IS_ENABLED(EFI_LOADER) to avoid explicitly checking CONFIG_SPL too. This simplifies the conditional. Signed-off-by: Stephen Warren Signed-off-by: Alexander Graf --- arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 +- arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 2 +- arch/x86/lib/e820.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 052e0708d4..be00bd55ab 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -835,7 +835,7 @@ int dram_init_banksize(void) return 0; } -#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) +#if CONFIG_IS_ENABLED(EFI_LOADER) void efi_add_known_memory(void) { int i; diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index fc9de73bce..c9c2c3f6d3 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -135,7 +135,7 @@ remove_psci_node: fdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code, *boot_code_size); -#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) +#if CONFIG_IS_ENABLED(EFI_LOADER) efi_add_memory_map((uintptr_t)&secondary_boot_code, ALIGN(*boot_code_size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT, EFI_RESERVED_MEMORY_TYPE, false); diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c index 8b34f677d9..d6ae2c4e9d 100644 --- a/arch/x86/lib/e820.c +++ b/arch/x86/lib/e820.c @@ -36,7 +36,7 @@ __weak unsigned int install_e820_map(unsigned int max_entries, return 4; } -#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) +#if CONFIG_IS_ENABLED(EFI_LOADER) void efi_add_known_memory(void) { struct e820_entry e820[E820MAX]; @@ -72,4 +72,4 @@ void efi_add_known_memory(void) efi_add_memory_map(start, pages, type, false); } } -#endif /* defined(EFI_LOADER) && !defined(CONFIG_SPL_BUILD) */ +#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */ -- cgit v1.2.3