blob: 1395a0710cfb7e73d7da3ad3661d8f4d78006656 [file] [log] [blame]
Mariusz Szafranskia4041332017-08-02 17:28:17 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2015 - 2017 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <console/console.h>
18#include <device/device.h>
19#include <device/pci.h>
20#include <device/pci_ids.h>
21#include <arch/io.h>
Kyösti Mälkkif1b58b72019-03-01 13:43:02 +020022#include <device/pci_ops.h>
Mariusz Szafranskia4041332017-08-02 17:28:17 +020023
24#include <soc/pci_devs.h>
25#include <soc/ramstage.h>
26
27static void usb_xhci_init(struct device *dev)
28{
29 /* USB XHCI configuration is handled by the FSP */
30
31 printk(BIOS_NOTICE, "pch: %s\n", __func__);
32
33 /* Set the value for PCI command register. */
34 pci_write_config16(dev, PCI_COMMAND,
35 PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
36}
37
38static struct device_operations usb_xhci_ops = {
39 .read_resources = pci_dev_read_resources,
40 .set_resources = pci_dev_set_resources,
41 .enable_resources = pci_dev_enable_resources,
42 .init = usb_xhci_init,
43 .enable = pci_dev_enable_resources,
44 .scan_bus = 0,
45 .ops_pci = &soc_pci_ops,
46};
47
48static const struct pci_driver pch_usb_xhci __pci_driver = {
49 .ops = &usb_xhci_ops,
50 .vendor = PCI_VENDOR_ID_INTEL,
51 .device = XHCI_DEVID,
52};