11 #include <soc/pci_devs.h>
16 #define XHCI_USBCMD 0x80
17 #define USBCMD_HCRST (1 << 1)
20 #define XHCI_STATUS_CCS (1 << 0)
27 if (mem_base == 0 || mem_base == 0xffffffff)
44 unsigned int port_type,
unsigned int port_id)
55 if ((port_type ==
XHCI_USB2 && port_id >=
info->num_usb2_ports) ||
67 info->usb2_port_status_reg + port_id * 0x10;
70 info->usb3_port_status_reg + port_id * 0x10;
71 port_status =
read32((
void *)port_sts_reg);
74 if (port_status == 0xffffffff)
81 unsigned int port_id))
90 printk(
BIOS_ERR,
"%s: Could not locate XHCI device in DT\n", __func__);
100 enable = is_usb_port_connected(
info,
port->path.usb.port_type,
101 port->path.usb.port_id);
102 }
else if (ext_usb_xhci_en_cb) {
104 enable = ext_usb_xhci_en_cb(
port->path.usb.port_type,
105 port->path.usb.port_id);
110 __func__,
port->path.usb.port_type,
111 port->path.usb.port_id);
127 #if CONFIG(HAVE_ACPI_TABLES)
156 static const struct pci_driver pch_usb_xhci
__pci_driver = {
static uint32_t read32(const void *addr)
#define printk(level,...)
DEVTREE_CONST struct device * pcidev_path_on_root(pci_devfn_t devfn)
DEVTREE_CONST struct device * dev_bus_each_child(const struct bus *parent, DEVTREE_CONST struct device *prev_child)
Given a device and previous match iterate through all the children.
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
static struct smmstore_params_info info
static DEVTREE_CONST void * config_of(const struct device *dev)
#define setbits8(addr, set)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
#define PCI_BASE_ADDRESS_MEM_ATTR_MASK
#define PCI_BASE_ADDRESS_0
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
void pci_dev_set_resources(struct device *dev)
#define PCI_DID_INTEL_CNP_H_XHCI
#define PCI_DID_INTEL_JSP_XHCI
#define PCI_DID_INTEL_UPT_H_XHCI
#define PCI_DID_INTEL_MCC_XHCI
#define PCI_DID_INTEL_GLK_XHCI
#define PCI_DID_INTEL_LWB_XHCI_SUPER
#define PCI_DID_INTEL_APL_XHCI
#define PCI_DID_INTEL_TGP_LP_XHCI
#define PCI_DID_INTEL_SPT_H_XHCI
#define PCI_DID_INTEL_SPT_LP_XHCI
#define PCI_DID_INTEL_MTL_XHCI
#define PCI_DID_INTEL_LWB_XHCI
#define PCI_DID_INTEL_CMP_LP_XHCI
#define PCI_DID_INTEL_ADP_P_XHCI
#define PCI_DID_INTEL_TGP_H_XHCI
#define PCI_DID_INTEL_CMP_H_XHCI
#define PCI_DID_INTEL_ADP_M_XHCI
#define PCI_DID_INTEL_CNL_LP_XHCI
#define PCI_DID_INTEL_ICP_LP_XHCI
#define PCI_DID_INTEL_ADP_S_XHCI
void scan_static_bus(struct device *bus)
const struct smm_save_state_ops *legacy_ops __weak
static const char * soc_acpi_name(const struct device *dev)
const struct xhci_usb_info * soc_get_xhci_usb_info(pci_devfn_t xhci_dev)
static const struct pci_driver baytrail_xhci __pci_driver
void usb_xhci_disable_unused(bool(*ext_usb_xhci_en_cb)(unsigned int port_type, unsigned int port_id))
static const unsigned short pci_device_ids[]
static uint8_t * xhci_mem_base(void)
void xhci_host_reset(void)
static struct device_operations usb_xhci_ops
void soc_xhci_init(struct device *dev)
void(* read_resources)(struct device *dev)
DEVTREE_CONST struct bus * link_list