cpu/x86/tsc: Deduplicate Makefile logic
The code under `cpu/x86/tsc` is only compiled in when its `Makefile.inc` is included from platform (CPU/SoC) code and the `UDELAY_TSC` Kconfig option is enabled. Include `cpu/x86/tsc/Makefile.inc` once from `cpu/x86/Makefile.inc` and drop the now-redundant inclusions from platform code. Also, deduplicate the `UDELAY_TSC` guards. Change-Id: I41e96026f37f19de954fd5985b92a08cb97876c1 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57456 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
1a4496e79f
commit
44985ae757
|
@ -7,7 +7,6 @@ ramstage-y += chip_name.c
|
|||
ramstage-y += model_14_init.c
|
||||
|
||||
subdirs-y += ../../mtrr
|
||||
subdirs-y += ../../../x86/tsc
|
||||
subdirs-y += ../../../x86/lapic
|
||||
subdirs-y += ../../../x86/cache
|
||||
subdirs-y += ../../../x86/mtrr
|
||||
|
|
|
@ -10,7 +10,6 @@ smm-y += udelay.c
|
|||
|
||||
subdirs-y += ../../mtrr
|
||||
subdirs-y += ../../smm
|
||||
subdirs-y += ../../../x86/tsc
|
||||
subdirs-y += ../../../x86/lapic
|
||||
subdirs-y += ../../../x86/cache
|
||||
subdirs-y += ../../../x86/mtrr
|
||||
|
|
|
@ -7,7 +7,6 @@ ramstage-y += chip_name.c
|
|||
ramstage-y += model_16_init.c
|
||||
|
||||
subdirs-y += ../../mtrr
|
||||
subdirs-y += ../../../x86/tsc
|
||||
subdirs-y += ../../../x86/lapic
|
||||
subdirs-y += ../../../x86/cache
|
||||
subdirs-y += ../../../x86/mtrr
|
||||
|
|
|
@ -8,7 +8,6 @@ ramstage-y += model_16_init.c
|
|||
ramstage-y += update_microcode.c
|
||||
|
||||
subdirs-y += ../../mtrr
|
||||
subdirs-y += ../../../x86/tsc
|
||||
subdirs-y += ../../../x86/lapic
|
||||
subdirs-y += ../../../x86/cache
|
||||
subdirs-y += ../../../x86/mtrr
|
||||
|
|
|
@ -15,7 +15,6 @@ bootblock-y += bootblock.c
|
|||
|
||||
postcar-y += ../car/non-evict/exit_car.S
|
||||
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -3,7 +3,6 @@ subdirs-y += ../../x86/name
|
|||
subdirs-y += ../../x86/cache
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../intel/turbo
|
||||
subdirs-y += ../../intel/microcode
|
||||
subdirs-y += ../smm/gen1
|
||||
|
|
|
@ -2,7 +2,6 @@ ramstage-y += model_206ax_init.c
|
|||
subdirs-y += ../../x86/name
|
||||
subdirs-y += ../smm/gen1
|
||||
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -7,7 +7,6 @@ subdirs-y += ../model_65x
|
|||
subdirs-y += ../model_67x
|
||||
subdirs-y += ../model_68x
|
||||
subdirs-y += ../model_6bx
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
subdirs-y += ../model_106cx
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
subdirs-y += ../model_1067x
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
subdirs-y += ../model_106cx
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -4,7 +4,6 @@ subdirs-y += ../model_f4x
|
|||
#subdirs-y += ../model_f6x
|
||||
#subdirs-y += ../model_1066x
|
||||
subdirs-y += ../model_1067x
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
subdirs-y += ../model_6ex
|
||||
subdirs-y += ../model_6fx
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
subdirs-y += ../model_f2x
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
subdirs-y += ../model_6fx
|
||||
subdirs-y += ../model_1067x
|
||||
subdirs-y += ../../x86/tsc
|
||||
subdirs-y += ../../x86/mtrr
|
||||
subdirs-y += ../../x86/lapic
|
||||
subdirs-y += ../../x86/cache
|
||||
|
|
|
@ -9,4 +9,3 @@ ramstage-y += qemu.c
|
|||
|
||||
subdirs-y += ../x86/mtrr
|
||||
subdirs-y += ../x86/lapic
|
||||
subdirs-y += ../x86/tsc
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
subdirs-y += pae
|
||||
subdirs-$(CONFIG_HAVE_SMI_HANDLER) += smm
|
||||
subdirs-$(CONFIG_UDELAY_TSC) += tsc
|
||||
|
||||
all-$(CONFIG_ARCH_ALL_STAGES_X86_64) += 64bit/mode_switch.S
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
bootblock-$(CONFIG_UDELAY_TSC) += delay_tsc.c
|
||||
ramstage-$(CONFIG_UDELAY_TSC) += delay_tsc.c
|
||||
romstage-$(CONFIG_UDELAY_TSC) += delay_tsc.c
|
||||
verstage_x86-$(CONFIG_UDELAY_TSC) += delay_tsc.c
|
||||
postcar-$(CONFIG_UDELAY_TSC) += delay_tsc.c
|
||||
smm-$(CONFIG_UDELAY_TSC) += delay_tsc.c
|
||||
bootblock-y += delay_tsc.c
|
||||
ramstage-y += delay_tsc.c
|
||||
romstage-y += delay_tsc.c
|
||||
verstage_x86-y += delay_tsc.c
|
||||
postcar-y += delay_tsc.c
|
||||
smm-y += delay_tsc.c
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H),y)
|
||||
|
||||
subdirs-y += ../../../../../../cpu/x86/tsc
|
||||
|
||||
bootblock-y += tsc_freq.c
|
||||
bootblock-y += monotonic_timer.c
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
ifeq ($(CONFIG_SOC_AMD_STONEYRIDGE),y)
|
||||
|
||||
subdirs-y += ../../../cpu/amd/mtrr/
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/cache
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
|
|
|
@ -4,7 +4,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
# all (bootblock, verstage, romstage, postcar, ramstage)
|
||||
all-y += gspi.c
|
||||
|
|
|
@ -5,7 +5,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../cpu/x86/cache
|
||||
|
||||
bootblock-y += bootblock/bootblock.c
|
||||
|
|
|
@ -3,7 +3,6 @@ ifeq ($(CONFIG_SOC_INTEL_BAYTRAIL),y)
|
|||
subdirs-y += romstage
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../cpu/intel/microcode
|
||||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/intel/common
|
||||
|
|
|
@ -3,7 +3,6 @@ ifeq ($(CONFIG_SOC_INTEL_BRASWELL),y)
|
|||
subdirs-y += romstage
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../cpu/intel/microcode
|
||||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/intel/common
|
||||
|
|
|
@ -5,7 +5,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../cpu/intel/common
|
||||
|
||||
bootblock-y += bootblock/bootblock.c
|
||||
|
|
|
@ -6,7 +6,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../cpu/x86/cache
|
||||
|
||||
bootblock-y += bootblock/bootblock.c
|
||||
|
|
|
@ -5,7 +5,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
# all (bootblock, verstage, romstage, postcar, ramstage)
|
||||
all-y += gspi.c
|
||||
|
|
|
@ -5,7 +5,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
# all (bootblock, verstage, romstage, postcar, ramstage)
|
||||
all-y += gspi.c
|
||||
|
|
|
@ -5,7 +5,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
# all (bootblock, verstage, romstage, postcar, ramstage)
|
||||
all-y += gspi.c
|
||||
|
|
|
@ -4,7 +4,6 @@ ifeq ($(CONFIG_SOC_INTEL_QUARK),y)
|
|||
|
||||
subdirs-y += romstage
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
bootblock-y += bootblock/esram_init.S
|
||||
bootblock-y += bootblock/bootblock.c
|
||||
|
|
|
@ -7,7 +7,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
bootblock-y += bootblock/bootblock.c
|
||||
bootblock-y += i2c.c
|
||||
|
|
|
@ -5,7 +5,6 @@ subdirs-y += ../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../cpu/x86/tsc
|
||||
|
||||
# all (bootblock, verstage, romstage, postcar, ramstage)
|
||||
all-y += gspi.c
|
||||
|
|
|
@ -5,7 +5,6 @@ ifeq ($(CONFIG_SOC_INTEL_COOPERLAKE_SP),y)
|
|||
subdirs-y += ../../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../../cpu/intel/microcode
|
||||
|
||||
romstage-y += romstage.c ddr.c
|
||||
|
|
|
@ -6,7 +6,6 @@ subdirs-y += ../../../../cpu/intel/microcode
|
|||
subdirs-y += ../../../../cpu/intel/turbo
|
||||
subdirs-y += ../../../../cpu/x86/lapic
|
||||
subdirs-y += ../../../../cpu/x86/mtrr
|
||||
subdirs-y += ../../../../cpu/x86/tsc
|
||||
subdirs-y += ../../../../cpu/x86/cache
|
||||
|
||||
postcar-y += soc_util.c
|
||||
|
|
Loading…
Reference in New Issue