blob: 3a43bbd2b7795961a9f169c542ae0d4fd49dacc3 [file] [log] [blame]
Angel Pons80d92382020-04-05 15:47:00 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Mariusz Szafranskia4041332017-08-02 17:28:17 +02003
4#include <console/console.h>
5#include <device/device.h>
6#include <device/pci.h>
7#include <device/pci_ids.h>
Kyösti Mälkkif1b58b72019-03-01 13:43:02 +02008#include <device/pci_ops.h>
Mariusz Szafranskia4041332017-08-02 17:28:17 +02009
10#include <soc/pci_devs.h>
11#include <soc/ramstage.h>
12
13static void usb_xhci_init(struct device *dev)
14{
15 /* USB XHCI configuration is handled by the FSP */
16
17 printk(BIOS_NOTICE, "pch: %s\n", __func__);
18
19 /* Set the value for PCI command register. */
20 pci_write_config16(dev, PCI_COMMAND,
21 PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
22}
23
24static struct device_operations usb_xhci_ops = {
25 .read_resources = pci_dev_read_resources,
26 .set_resources = pci_dev_set_resources,
27 .enable_resources = pci_dev_enable_resources,
28 .init = usb_xhci_init,
29 .enable = pci_dev_enable_resources,
Mariusz Szafranskia4041332017-08-02 17:28:17 +020030 .ops_pci = &soc_pci_ops,
31};
32
33static const struct pci_driver pch_usb_xhci __pci_driver = {
34 .ops = &usb_xhci_ops,
35 .vendor = PCI_VENDOR_ID_INTEL,
Felix Singerdbc90df2019-11-22 00:10:20 +010036 .device = PCI_DEVICE_ID_INTEL_DENVERTON_XHCI,
Mariusz Szafranskia4041332017-08-02 17:28:17 +020037};