diff options
author | Shuo Liu <shuo.liu@intel.com> | 2024-05-11 03:23:23 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-05-24 13:28:25 +0000 |
commit | c2ed5eaa12fb3f0da5bdf2acb6f4a688e9b374d3 (patch) | |
tree | e91f73e30b7866df413a0550d7a362258c4c4416 /src/soc/intel/xeon_sp/include | |
parent | 8ed95c3d2b349c6fb105c8b72bd99b0b584073af (diff) |
soc/intel/xeon_sp: Move get_cxl_mode out of soc/util.h
get_cxl_mode() is the interface for CXL mode config check used by
SoC codes. It could be implemented by mechanisms outside of the
SoC codes, e.g. board codes or OCP VPD driver.
Move the interface declaration out of soc/util.h to a dedicated
header, a.k.a., soc/config.h, so that the implementation codes do
not need to include soc/util.h where there are lots of irrelevant
definitions. Future SoC config check interfaces could be added
to soc/config.h as well.
The default weak implementation is moved out of util.c to
config.c as well.
TEST=Build and boot on intel/archercity CRB
Change-Id: Ia0302b0d3fd93c49e1d6f64e8159f59d50f33e20
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82293
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp/include')
-rw-r--r-- | src/soc/intel/xeon_sp/include/soc/chip_common.h | 6 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/include/soc/config.h | 14 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/include/soc/util.h | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/soc/intel/xeon_sp/include/soc/chip_common.h b/src/soc/intel/xeon_sp/include/soc/chip_common.h index 5bdc87fbf5..5fd5dc6f18 100644 --- a/src/soc/intel/xeon_sp/include/soc/chip_common.h +++ b/src/soc/intel/xeon_sp/include/soc/chip_common.h @@ -33,12 +33,6 @@ static inline void init_xeon_domain_path(struct device_path *path, int socket, path->domain.domain = dp.domain_path; }; -enum xeonsp_cxl_mode { - XEONSP_CXL_DISABLED = 0, - XEONSP_CXL_SYS_MEM, - XEONSP_CXL_SP_MEM, -}; - /* * Every STACK can have multiple PCI domains with an unique domain type. * This is only of cosmetic nature and generates more readable ACPI code, diff --git a/src/soc/intel/xeon_sp/include/soc/config.h b/src/soc/intel/xeon_sp/include/soc/config.h new file mode 100644 index 0000000000..6d5f3d587d --- /dev/null +++ b/src/soc/intel/xeon_sp/include/soc/config.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef _XEON_SP_SOC_CONFIG_H_ +#define _XEON_SP_SOC_CONFIG_H_ + +enum xeonsp_cxl_mode { + XEONSP_CXL_DISABLED = 0, + XEONSP_CXL_SYS_MEM, + XEONSP_CXL_SP_MEM, +}; + +enum xeonsp_cxl_mode get_cxl_mode(void); + +#endif diff --git a/src/soc/intel/xeon_sp/include/soc/util.h b/src/soc/intel/xeon_sp/include/soc/util.h index af749023b5..e694af3e3c 100644 --- a/src/soc/intel/xeon_sp/include/soc/util.h +++ b/src/soc/intel/xeon_sp/include/soc/util.h @@ -31,6 +31,4 @@ void bios_done_msr(void *unused); union p2sb_bdf soc_get_hpet_bdf(void); union p2sb_bdf soc_get_ioapic_bdf(void); -enum xeonsp_cxl_mode get_cxl_mode(void); - #endif |