coreboot/src/drivers
Angel Pons 4e5655a756 Xeon-SP boards: Factor out OCP VPD get_cxl_mode() impl
There's two copies of the `get_cxl_mode()` function to map the OCP VPD
value to the values expected by platform code. As this is unnecessary,
have a single copy of this function in the OCP VPD driver code. As the
`get_cxl_mode()` function is Xeon-SP only, keep it in a separate file.

This change simplifies things for boards using OCP VPD for CXL and has
no impact for boards *not* using OCP VPD:

- Boards not using OCP VPD can still define get_cxl_mode() in mainboard
  code as needed, just like they were able to do before.
- Boards using OCP VPD but without CXL (`SOC_INTEL_HAS_CXL` is not
  enabled), this code won't get compiled in at all (see `Makefile.mk`).
- Boards using OCP VPD and CXL will automatically make use of this
  `get_cxl_mode()` definition, which should be the same for all boards.

It is possible that this may need to be expanded/adapted in the future,
which is easy to handle in a follow-up commit when the need arises.

TEST=Build and boot on intel/archercity CRB

Change-Id: I935c4eb5b2392e2d0dc01b9f66d46c79b8141ea7
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82224
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-06-05 10:59:59 +00:00
..
acpi/thermal_zone tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
amd tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
ams
analogix/anx7625
asmedia
aspeed
broadcom
camera
crb
efi
elog
emulation/qemu
generic tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
genesyslogic
gfx/generic
i2c tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
intel soc/intel/meteorlake: Exclude deprecated upd from FSP2.4 builds 2024-05-31 08:22:01 +00:00
ipmi
lenovo
maxim
mipi drivers/mipi: Update init code for IVO_T109NW41 panel 2024-05-10 09:25:59 +00:00
mrc_cache
net
nxp/uwb tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
ocp Xeon-SP boards: Factor out OCP VPD get_cxl_mode() impl 2024-06-05 10:59:59 +00:00
parade
pc80 drivers/pc80/tpm: Disable device if TPM not present 2024-04-26 11:55:38 +00:00
pcie
ricoh/rce822
secunet/dmi
siemens/nc_fpga
sil/3114
smbus
smmstore
sof
soundwire
spi tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
ti
tpm
uart tree: Remove unused <string.h> 2024-05-29 10:34:08 +00:00
usb tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
vpd
wifi/generic tree: Use <stdio.h> for snprintf 2024-05-29 10:33:54 +00:00
wwan/fm