Kbuild: Always use $(PHASE_)

It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
Makefiles as part of the macros to determine when to do something in our
Makefiles based on what phase of the build we are in. For consistency,
bring this down to a single macro and use "$(PHASE_)" only.

Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index fd409b9..7dc3171 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 ifeq ($(CONFIG_EFI_APP),)
-ifdef CONFIG_$(XPL_)X86_64
+ifdef CONFIG_$(PHASE_)X86_64
 head-y := arch/x86/cpu/start64.o
 else
 ifeq ($(CONFIG_$(PHASE_)X86_16BIT_INIT),y)
diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
index 39c8b08..cc55c8f 100644
--- a/arch/x86/cpu/Makefile
+++ b/arch/x86/cpu/Makefile
@@ -6,7 +6,7 @@
 # (C) Copyright 2002
 # Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
 
-ifeq ($(CONFIG_$(XPL_)X86_64),y)
+ifeq ($(CONFIG_$(PHASE_)X86_64),y)
 extra-y	= start64.o
 else
 ifeq ($(CONFIG_$(PHASE_)X86_16BIT_INIT),y)
@@ -31,7 +31,7 @@
 obj-y	+= cpu_x86.o
 endif
 
-ifndef CONFIG_$(XPL_)X86_64
+ifndef CONFIG_$(PHASE_)X86_64
 AFLAGS_REMOVE_call32.o := -mregparm=3 \
 	$(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32)
 AFLAGS_call32.o := -fpic -fshort-wchar \
@@ -59,18 +59,18 @@
 ifndef CONFIG_SYS_COREBOOT
 obj-$(CONFIG_$(PHASE_)X86_32BIT_INIT) += irq.o
 endif
-ifndef CONFIG_$(XPL_)X86_64
-obj-$(CONFIG_$(XPL_)SMP) += mp_init.o
+ifndef CONFIG_$(PHASE_)X86_64
+obj-$(CONFIG_$(PHASE_)SMP) += mp_init.o
 endif
 obj-y += mtrr.o
 obj-$(CONFIG_PCI) += pci.o
-ifndef CONFIG_$(XPL_)X86_64
+ifndef CONFIG_$(PHASE_)X86_64
 obj-$(CONFIG_SMP) += sipi_vector.o
 endif
 obj-y += turbo.o
 obj-$(CONFIG_HAVE_ACPI_RESUME) += wakeup.o
 
-ifeq ($(CONFIG_$(XPL_)X86_64),y)
+ifeq ($(CONFIG_$(PHASE_)X86_64),y)
 obj-y += x86_64/
 else
 obj-y += i386/
diff --git a/arch/x86/cpu/intel_common/Makefile b/arch/x86/cpu/intel_common/Makefile
index a28e6c7..3f77f2b 100644
--- a/arch/x86/cpu/intel_common/Makefile
+++ b/arch/x86/cpu/intel_common/Makefile
@@ -26,10 +26,10 @@
 obj-y += fast_spi.o
 obj-y += lpc.o
 obj-y += lpss.o
-obj-$(CONFIG_$(XPL_)INTEL_GENERIC_WIFI) += generic_wifi.o
+obj-$(CONFIG_$(PHASE_)INTEL_GENERIC_WIFI) += generic_wifi.o
 ifndef CONFIG_EFI_APP
 obj-$(CONFIG_$(PHASE_)X86_32BIT_INIT) += microcode.o
-ifndef CONFIG_$(XPL_)X86_64
+ifndef CONFIG_$(PHASE_)X86_64
 obj-y += microcode.o
 endif
 endif
diff --git a/arch/x86/cpu/ivybridge/Makefile b/arch/x86/cpu/ivybridge/Makefile
index 471ad8d..6f6d10a 100644
--- a/arch/x86/cpu/ivybridge/Makefile
+++ b/arch/x86/cpu/ivybridge/Makefile
@@ -5,15 +5,15 @@
 ifdef CONFIG_HAVE_FSP
 obj-y += fsp_configs.o ivybridge.o
 else
-obj-$(CONFIG_$(XPL_)X86_32BIT_INIT) += cpu.o
+obj-$(CONFIG_$(PHASE_)X86_32BIT_INIT) += cpu.o
 obj-y += early_me.o
 obj-y += lpc.o
 obj-y += northbridge.o
 ifndef CONFIG_XPL_BUILD
 obj-y += sata.o
 endif
-obj-$(CONFIG_$(XPL_)X86_32BIT_INIT) += sdram.o
-ifndef CONFIG_$(XPL_)X86_32BIT_INIT
+obj-$(CONFIG_$(PHASE_)X86_32BIT_INIT) += sdram.o
+ifndef CONFIG_$(PHASE_)X86_32BIT_INIT
 obj-y += sdram_nop.o
 endif
 endif
diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile
index 1439916..2134b0d 100644
--- a/arch/x86/cpu/qemu/Makefile
+++ b/arch/x86/cpu/qemu/Makefile
@@ -2,7 +2,7 @@
 #
 # Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
 
-ifndef CONFIG_$(XPL_)X86_64
+ifndef CONFIG_$(PHASE_)X86_64
 obj-y += car.o
 endif
 obj-y += dram.o
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 43e6a1d..c60a479 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -19,7 +19,7 @@
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 endif
 obj-y	+= cmd_boot.o
-obj-$(CONFIG_$(XPL_)COREBOOT_SYSINFO)	+= coreboot/
+obj-$(CONFIG_$(PHASE_)COREBOOT_SYSINFO)	+= coreboot/
 obj-$(CONFIG_SEABIOS) += coreboot_table.o
 obj-y	+= early_cmos.o
 obj-y	+= e820.o
@@ -90,7 +90,7 @@
 
 ifdef CONFIG_EFI_STUB
 
-ifeq ($(CONFIG_$(XPL_)X86_64),)
+ifeq ($(CONFIG_$(PHASE_)X86_64),)
 extra-y += $(EFI_CRT0) $(EFI_RELOC)
 endif