coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
xhci.c File Reference
#include <console/console.h>
#include <device/mmio.h>
#include <intelblocks/xhci.h>
#include <soc/soc_chip.h>
Include dependency graph for xhci.c:

Go to the source code of this file.

Macros

#define XHCI_USB2_PORT_STATUS_REG   0x480
 
#define XHCI_USB3_PORT_STATUS_REG   0x500
 
#define XHCI_USB2_PORT_NUM   8
 
#define XHCI_USB3_PORT_NUM   6
 
#define XHCI_PMCTRL   0x80A4
 
#define PMCTRL_LFPS_OFFTIME_SHIFT   4
 
#define PMCTRL_LFPS_OFFTIME_MAX   0xF
 

Functions

const struct xhci_usb_infosoc_get_xhci_usb_info (pci_devfn_t xhci_dev)
 
static void set_xhci_lfps_sampling_offtime (struct device *dev, uint8_t time_ms)
 
void soc_xhci_init (struct device *dev)
 

Variables

static const struct xhci_usb_info usb_info
 

Macro Definition Documentation

◆ PMCTRL_LFPS_OFFTIME_MAX

#define PMCTRL_LFPS_OFFTIME_MAX   0xF

Definition at line 16 of file xhci.c.

◆ PMCTRL_LFPS_OFFTIME_SHIFT

#define PMCTRL_LFPS_OFFTIME_SHIFT   4

Definition at line 15 of file xhci.c.

◆ XHCI_PMCTRL

#define XHCI_PMCTRL   0x80A4

Definition at line 13 of file xhci.c.

◆ XHCI_USB2_PORT_NUM

#define XHCI_USB2_PORT_NUM   8

Definition at line 10 of file xhci.c.

◆ XHCI_USB2_PORT_STATUS_REG

#define XHCI_USB2_PORT_STATUS_REG   0x480

Definition at line 8 of file xhci.c.

◆ XHCI_USB3_PORT_NUM

#define XHCI_USB3_PORT_NUM   6

Definition at line 11 of file xhci.c.

◆ XHCI_USB3_PORT_STATUS_REG

#define XHCI_USB3_PORT_STATUS_REG   0x500

Definition at line 9 of file xhci.c.

Function Documentation

◆ set_xhci_lfps_sampling_offtime()

static void set_xhci_lfps_sampling_offtime ( struct device dev,
uint8_t  time_ms 
)
static

Definition at line 31 of file xhci.c.

References addr, resource::base, BIOS_DEBUG, BIOS_ERR, clrsetbits32, PCI_BASE_ADDRESS_0, PMCTRL_LFPS_OFFTIME_MAX, PMCTRL_LFPS_OFFTIME_SHIFT, printk, probe_resource(), and XHCI_PMCTRL.

Referenced by soc_xhci_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soc_get_xhci_usb_info()

const struct xhci_usb_info* soc_get_xhci_usb_info ( pci_devfn_t  xhci_dev)

Definition at line 25 of file xhci.c.

References usb_info.

◆ soc_xhci_init()

void soc_xhci_init ( struct device dev)

Definition at line 56 of file xhci.c.

References config, config_of_soc, and set_xhci_lfps_sampling_offtime().

Here is the call graph for this function:

Variable Documentation

◆ usb_info

const struct xhci_usb_info usb_info
static
Initial value:
= {
.usb2_port_status_reg = XHCI_USB2_PORT_STATUS_REG,
.num_usb2_ports = XHCI_USB2_PORT_NUM,
.usb3_port_status_reg = XHCI_USB3_PORT_STATUS_REG,
.num_usb3_ports = XHCI_USB3_PORT_NUM,
}
#define XHCI_USB3_PORT_STATUS_REG
Definition: xhci.c:9
#define XHCI_USB3_PORT_NUM
Definition: xhci.c:11
#define XHCI_USB2_PORT_NUM
Definition: xhci.c:10
#define XHCI_USB2_PORT_STATUS_REG
Definition: xhci.c:8

Definition at line 1 of file xhci.c.

Referenced by soc_get_xhci_usb_info().