Debian Codegraph @

src/soc/intel/xeon_sp/pcu6.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 pcu6_final(struct device *dev)
11 {
12 printk(BIOS_INFO, "%s: locking registers\n", dev_path(dev));
13 pci_or_config32(dev, PCU_CR6_PLATFORM_RAPL_LIMIT_CFG_UPR,
14 PLT_PWR_LIM_LOCK_UPR);
15 pci_or_config32(dev, PCU_CR6_PLATFORM_POWER_INFO_CFG_UPR,
16 PLT_PWR_INFO_LOCK_UPR);
17 }
18
19 static struct device_operations pcu6_ops = {
20 .read_resources = pci_dev_read_resources,
21 .set_resources = pci_dev_set_resources,
22 .enable_resources = pci_dev_enable_resources,
23 .final = pcu6_final,
24 };
25
26 static const struct pci_driver pcu6_driver __pci_driver = {
27 .ops = &pcu6_ops,
28 .vendor = PCI_VID_INTEL,
29 .device = PCU_CR6_DEVID,
30 };