1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/device.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7 #include <reg_script.h>
11 #include <soc/pci_devs.h>
13 #include <soc/ramstage.h>
18 static void xhci_init(struct device
*dev
)
20 struct soc_intel_braswell_config
*config
= config_of(dev
);
22 if (config
->usb_comp_bg
) {
23 struct reg_script ops
[] = {
24 REG_IOSF_WRITE(IOSF_PORT_USBPHY
, USBPHY_COMPBG
, config
->usb_comp_bg
),
27 printk(BIOS_INFO
, "Override USB2_COMPBG to: 0x%X\n", config
->usb_comp_bg
);
32 static struct device_operations xhci_device_ops
= {
33 .read_resources
= pci_dev_read_resources
,
34 .set_resources
= pci_dev_set_resources
,
35 .enable_resources
= pci_dev_enable_resources
,
37 .ops_pci
= &soc_pci_ops
,
40 static const struct pci_driver soc_xhci __pci_driver
= {
41 .ops
= &xhci_device_ops
,
42 .vendor
= PCI_VID_INTEL
,