Angel Pons | 80d9238 | 2020-04-05 15:47:00 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Mariusz Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <device/device.h> |
| 5 | #include <device/pci.h> |
| 6 | #include <device/pci_ids.h> |
Kyösti Mälkki | f1b58b7 | 2019-03-01 13:43:02 +0200 | [diff] [blame] | 7 | #include <device/pci_ops.h> |
Mariusz Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 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. */ |
| 19 | pci_write_config16(dev, PCI_COMMAND, |
| 20 | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); |
| 21 | } |
| 22 | |
| 23 | static 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 Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 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_VENDOR_ID_INTEL, |
Jeff Daly | 2a81cab | 2022-01-06 16:32:11 -0500 | [diff] [blame] | 35 | .device = PCI_DEVICE_ID_INTEL_DNV_XHCI, |
Mariusz Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 36 | }; |