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

Go to the source code of this file.

Macros

#define XHCI_STATUS_WDE   (1 << 26)
 
#define XHCI_STATUS_WCE   (1 << 25)
 
#define XHCI_STATUS_PLC   (1 << 22)
 
#define XHCI_STATUS_CSC   (1 << 17)
 
#define XHCI_STATUS_PLS_SHIFT   (5)
 
#define XHCI_STATUS_PLS_MASK   (0xF << XHCI_STATUS_PLS_SHIFT)
 
#define XHCI_STATUS_PLS_RESUME   (15 << XHCI_STATUS_PLS_SHIFT)
 

Functions

static bool xhci_csc_set (uint32_t port_status)
 
static bool xhci_wake_capable (uint32_t port_status)
 
static bool xhci_plc_set (uint32_t port_status)
 
static bool xhci_resume (uint32_t port_status)
 
static bool xhci_port_wake_check (uintptr_t base, uint8_t num, uint8_t host_event, uint8_t event)
 
bool xhci_update_wake_event (const struct xhci_wake_info *wake_info, size_t wake_info_count)
 

Macro Definition Documentation

◆ XHCI_STATUS_CSC

#define XHCI_STATUS_CSC   (1 << 17)

Definition at line 17 of file elog.c.

◆ XHCI_STATUS_PLC

#define XHCI_STATUS_PLC   (1 << 22)

Definition at line 15 of file elog.c.

◆ XHCI_STATUS_PLS_MASK

#define XHCI_STATUS_PLS_MASK   (0xF << XHCI_STATUS_PLS_SHIFT)

Definition at line 20 of file elog.c.

◆ XHCI_STATUS_PLS_RESUME

#define XHCI_STATUS_PLS_RESUME   (15 << XHCI_STATUS_PLS_SHIFT)

Definition at line 21 of file elog.c.

◆ XHCI_STATUS_PLS_SHIFT

#define XHCI_STATUS_PLS_SHIFT   (5)

Definition at line 19 of file elog.c.

◆ XHCI_STATUS_WCE

#define XHCI_STATUS_WCE   (1 << 25)

Definition at line 13 of file elog.c.

◆ XHCI_STATUS_WDE

#define XHCI_STATUS_WDE   (1 << 26)

Definition at line 11 of file elog.c.

Function Documentation

◆ xhci_csc_set()

static bool xhci_csc_set ( uint32_t  port_status)
static

Definition at line 23 of file elog.c.

References XHCI_STATUS_CSC.

Referenced by xhci_port_wake_check().

Here is the caller graph for this function:

◆ xhci_plc_set()

static bool xhci_plc_set ( uint32_t  port_status)
static

Definition at line 34 of file elog.c.

References XHCI_STATUS_PLC.

Referenced by xhci_port_wake_check().

Here is the caller graph for this function:

◆ xhci_port_wake_check()

static bool xhci_port_wake_check ( uintptr_t  base,
uint8_t  num,
uint8_t  host_event,
uint8_t  event 
)
static

Definition at line 58 of file elog.c.

References base, elog_add_event_wake(), read32(), xhci_csc_set(), xhci_plc_set(), xhci_resume(), and xhci_wake_capable().

Referenced by xhci_update_wake_event().

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

◆ xhci_resume()

static bool xhci_resume ( uint32_t  port_status)
static

Definition at line 39 of file elog.c.

References XHCI_STATUS_PLS_MASK, and XHCI_STATUS_PLS_RESUME.

Referenced by xhci_port_wake_check().

Here is the caller graph for this function:

◆ xhci_update_wake_event()

◆ xhci_wake_capable()

static bool xhci_wake_capable ( uint32_t  port_status)
static

Definition at line 28 of file elog.c.

References XHCI_STATUS_WCE, and XHCI_STATUS_WDE.

Referenced by xhci_port_wake_check().

Here is the caller graph for this function: