coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
xhci.c
Go to the documentation of this file.
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_ids.h>
7 #include <device/pci_ops.h>
8 
9 #include <soc/pci_devs.h>
10 #include <soc/ramstage.h>
11 
12 static void usb_xhci_init(struct device *dev)
13 {
14  /* USB XHCI configuration is handled by the FSP */
15 
16  printk(BIOS_NOTICE, "pch: %s\n", __func__);
17 
18  /* Set the value for PCI command register. */
21 }
22 
23 static struct device_operations usb_xhci_ops = {
25  .set_resources = pci_dev_set_resources,
26  .enable_resources = pci_dev_enable_resources,
27  .init = usb_xhci_init,
28  .enable = pci_dev_enable_resources,
29  .ops_pci = &soc_pci_ops,
30 };
31 
32 static const struct pci_driver pch_usb_xhci __pci_driver = {
33  .ops = &usb_xhci_ops,
34  .vendor = PCI_VID_INTEL,
35  .device = PCI_DID_INTEL_DNV_XHCI,
36 };
#define printk(level,...)
Definition: stdlib.h:16
static __always_inline void pci_write_config16(const struct device *dev, u16 reg, u16 val)
Definition: pci_ops.h:70
#define BIOS_NOTICE
BIOS_NOTICE - Unexpected but relatively insignificant.
Definition: loglevel.h:100
#define PCI_COMMAND_MASTER
Definition: pci_def.h:13
#define PCI_COMMAND_MEMORY
Definition: pci_def.h:12
#define PCI_COMMAND
Definition: pci_def.h:10
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
#define PCI_DID_INTEL_DNV_XHCI
Definition: pci_ids.h:2774
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
struct pci_operations soc_pci_ops
Definition: chip.c:51
static struct device_operations usb_xhci_ops
Definition: xhci.c:23
static const struct pci_driver pch_usb_xhci __pci_driver
Definition: xhci.c:32
static void usb_xhci_init(struct device *dev)
Definition: xhci.c:12
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107