summaryrefslogtreecommitdiff
path: root/src/mainboard/inventec/transformers/util.c
blob: 5197b2329287eb2e7e08702f512c530b33c6aa86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/ocp/include/vpd.h>
#include <soc/chip_common.h>
#include <soc/util.h>

#if CONFIG(SOC_INTEL_HAS_CXL)
enum xeonsp_cxl_mode get_cxl_mode(void)
{
	int ocp_cxl_mode = get_cxl_mode_from_vpd();
	switch (ocp_cxl_mode) {
	case CXL_SYSTEM_MEMORY:
		return XEONSP_CXL_SYS_MEM;
	case CXL_SPM:
		return XEONSP_CXL_SP_MEM;
	default:
		return XEONSP_CXL_DISABLED;
	}
}
#endif