Debian Codegraph @

src/soc/intel/xeon_sp/pcu3.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 #include <device/pci.h>
4 #include <device/pci_ids.h>
5 #include <soc/pci_devs.h>
6 #include <soc/pcu.h>
7 #include <soc/ramstage.h>
8 #include <soc/util.h>
9
10 static void pcu3_final(struct device *dev)
11 {
12 printk(BIOS_INFO, "%s: locking registers\n", dev_path(dev));
13 pci_or_config32(dev, PCU_CR3_CONFIG_TDP_CONTROL, TDP_LOCK);
14 if (CONFIG(SOC_INTEL_SKYLAKE_SP) || CONFIG(SOC_INTEL_COOPERLAKE_SP)) {
15 pci_or_config32(dev, PCU_CR3_FLEX_RATIO, OC_LOCK);
16 }
17 }
18
19 static struct device_operations pcu3_ops = {
20 .read_resources = pci_dev_read_resources,
21 .set_resources = pci_dev_set_resources,
22 .enable_resources = pci_dev_enable_resources,
23 .final = pcu3_final,
24 };
25
26 static const struct pci_driver pcu3_driver __pci_driver = {
27 .ops = &pcu3_ops,
28 .vendor = PCI_VID_INTEL,
29 .device = PCU_CR3_DEVID,
30 };