This code is not actually x86-specific, so move it into the lib/efi dir where other archs can use it.
Drop inclusion of the unnecessary x86-specific header. Signed-off-by: Simon Glass <s...@chromium.org> Reviewed-by: Tom Rini <tr...@konsulko.com> --- (no changes since v1) arch/x86/cpu/efi/Makefile | 1 - lib/efi/Makefile | 1 + {arch/x86/cpu => lib}/efi/sdram.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) rename {arch/x86/cpu => lib}/efi/sdram.c (94%) diff --git a/arch/x86/cpu/efi/Makefile b/arch/x86/cpu/efi/Makefile index 9716a4ebe08..9be1d5e5401 100644 --- a/arch/x86/cpu/efi/Makefile +++ b/arch/x86/cpu/efi/Makefile @@ -4,7 +4,6 @@ ifdef CONFIG_EFI_APP obj-y += app.o -obj-y += sdram.o endif ifdef CONFIG_EFI_STUB diff --git a/lib/efi/Makefile b/lib/efi/Makefile index 315625c0e8c..5081d71a19f 100644 --- a/lib/efi/Makefile +++ b/lib/efi/Makefile @@ -3,6 +3,7 @@ # (C) Copyright 2015 Google, Inc obj-$(CONFIG_EFI_APP) += efi_app.o efi.o efi_app_init.o efi_vars.o efi_dtb.o +obj-$(CONFIG_EFI_APP) += sdram.o obj-$(CONFIG_EFI_STUB) += efi_info.o ifeq ($(CONFIG_ARM64),y) diff --git a/arch/x86/cpu/efi/sdram.c b/lib/efi/sdram.c similarity index 94% rename from arch/x86/cpu/efi/sdram.c rename to lib/efi/sdram.c index 6fe40071140..bd59dfade0f 100644 --- a/arch/x86/cpu/efi/sdram.c +++ b/lib/efi/sdram.c @@ -6,7 +6,6 @@ #include <efi.h> #include <init.h> #include <asm/global_data.h> -#include <asm/u-boot-x86.h> DECLARE_GLOBAL_DATA_PTR; -- 2.43.0