coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pcie.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <device/device.h>
4 #include <device/pci.h>
5 #include <device/pci_ids.h>
6 #include "hudson.h"
7 
8 static void pcie_init(struct device *dev)
9 {
10 }
11 
12 static struct pci_operations lops_pci = {
13  .set_subsystem = 0,
14 };
15 
16 static struct device_operations pci_ops = {
18  .set_resources = pci_dev_set_resources,
19  .enable_resources = pci_bus_enable_resources,
20  .init = pcie_init,
21  .scan_bus = pci_scan_bridge,
22  .reset_bus = pci_bus_reset,
23  .ops_pci = &lops_pci,
24 };
25 
26 static const struct pci_driver pciea_driver __pci_driver = {
27  .ops = &pci_ops,
28  .vendor = PCI_VID_AMD,
29  .device = PCI_DID_AMD_SB900_PCIEA,
30 };
31 
32 static const struct pci_driver pcieb_driver __pci_driver = {
33  .ops = &pci_ops,
34  .vendor = PCI_VID_AMD,
35  .device = PCI_DID_AMD_SB900_PCIEB,
36 };
37 static const struct pci_driver pciec_driver __pci_driver = {
38  .ops = &pci_ops,
39  .vendor = PCI_VID_AMD,
40  .device = PCI_DID_AMD_SB900_PCIEC,
41 };
42 static const struct pci_driver pcied_driver __pci_driver = {
43  .ops = &pci_ops,
44  .vendor = PCI_VID_AMD,
45  .device = PCI_DID_AMD_SB900_PCIED,
46 };
void pci_bus_enable_resources(struct device *dev)
Definition: pci_device.c:758
void pci_bus_read_resources(struct device *dev)
Definition: pci_device.c:540
void pci_bus_reset(struct bus *bus)
Definition: pci_device.c:777
void pci_scan_bridge(struct device *dev)
Scan a PCI bridge and the buses behind the bridge.
Definition: pci_device.c:1598
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
#define PCI_VID_AMD
Definition: pci_ids.h:496
#define PCI_DID_AMD_SB900_PCIEC
Definition: pci_ids.h:528
#define PCI_DID_AMD_SB900_PCIEB
Definition: pci_ids.h:527
#define PCI_DID_AMD_SB900_PCIED
Definition: pci_ids.h:529
#define PCI_DID_AMD_SB900_PCIEA
Definition: pci_ids.h:526
void pcie_init(void)
Definition: pcie.c:84
static struct pci_operations lops_pci
Definition: pcie.c:12
static struct device_operations pci_ops
Definition: pcie.c:16
static const struct pci_driver pciea_driver __pci_driver
Definition: pcie.c:26
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107