Angel Pons | 80d9238 | 2020-04-05 15:47:00 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Mariusz Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 3 | |
| 4 | #include <console/console.h> |
| 5 | #include <device/device.h> |
| 6 | #include <device/pci.h> |
| 7 | #include <device/pci_ids.h> |
Kyösti Mälkki | f1b58b7 | 2019-03-01 13:43:02 +0200 | [diff] [blame] | 8 | #include <device/pci_ops.h> |
Mariusz Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 9 | |
| 10 | #include <soc/pci_devs.h> |
| 11 | #include <soc/ramstage.h> |
| 12 | |
| 13 | static 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 | |
| 24 | static 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 Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 30 | .ops_pci = &soc_pci_ops, |
| 31 | }; |
| 32 | |
| 33 | static const struct pci_driver pch_usb_xhci __pci_driver = { |
| 34 | .ops = &usb_xhci_ops, |
| 35 | .vendor = PCI_VENDOR_ID_INTEL, |
Felix Singer | dbc90df | 2019-11-22 00:10:20 +0100 | [diff] [blame] | 36 | .device = PCI_DEVICE_ID_INTEL_DENVERTON_XHCI, |
Mariusz Szafranski | a404133 | 2017-08-02 17:28:17 +0200 | [diff] [blame] | 37 | }; |