Debian Codegraph @

src/soc/intel/snowridge/heci.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_def.h>
7 #include <device/pci_ids.h>
8 #include <device/resource.h>
9
10 static void heci_read_resources(struct device *dev)
11 {
12 struct resource *res = NULL;
13
14 pci_dev_read_resources(dev);
15
16 /**
17 * Clear `IORESOURCE_PCI64` since we want this device to remain under 4G as it is used
18 * by FSP Notify.
19 */
20 res = find_resource(dev, PCI_BASE_ADDRESS_0);
21 res->limit = 0xffffffff;
22 res->flags &= ~IORESOURCE_PCI64;
23 }
24
25 static struct device_operations snr_heci_ops = {
26 .read_resources = heci_read_resources,
27 .set_resources = pci_dev_set_resources,
28 .enable_resources = pci_dev_enable_resources,
29 .ops_pci = &pci_dev_ops_pci,
30 };
31
32 static const struct pci_driver snr_heci_driver __pci_driver = {
33 .ops = &snr_heci_ops,
34 .vendor = PCI_VID_INTEL,
35 .device = PCI_DID_INTEL_SNR_HECI1,
36 };