blob: 2760120c2beaa08ef7a6a78a3bea69a705d93348 [file] [log] [blame]
Angel Pons80d92382020-04-05 15:47:00 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Mariusz Szafranskia4041332017-08-02 17:28:17 +02002
3#include <console/console.h>
4#include <device/device.h>
5#include <device/pci.h>
6#include <device/pci_ids.h>
Kyösti Mälkkif1b58b72019-03-01 13:43:02 +02007#include <device/pci_ops.h>
Mariusz Szafranskia4041332017-08-02 17:28:17 +02008
9#include <soc/pci_devs.h>
10#include <soc/ramstage.h>
11
12static 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. */
19 pci_write_config16(dev, PCI_COMMAND,
20 PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
21}
22
23static struct device_operations usb_xhci_ops = {
24 .read_resources = pci_dev_read_resources,
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,
Mariusz Szafranskia4041332017-08-02 17:28:17 +020029 .ops_pci = &soc_pci_ops,
30};
31
32static const struct pci_driver pch_usb_xhci __pci_driver = {
33 .ops = &usb_xhci_ops,
Felix Singer43b7f412022-03-07 04:34:52 +010034 .vendor = PCI_VID_INTEL,
35 .device = PCI_DID_INTEL_DNV_XHCI,
Mariusz Szafranskia4041332017-08-02 17:28:17 +020036};