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

Go to the source code of this file.

Data Structures

struct  usb_dwc3
 
struct  usb_dwc3_cfg
 

Functions

 check_member (usb_dwc3, usb2phycfg, 0x100)
 
 check_member (usb_dwc3, usb3pipectl, 0x1c0)
 
static void reset_usb (struct usb_dwc3_cfg *dwc3)
 
void reset_usb0 (void)
 
static void setup_dwc3 (struct usb_dwc3 *dwc3)
 
static void setup_usb_host (struct usb_dwc3_cfg *dwc3, void *board_data)
 
void setup_usb_host0 (void *board_data)
 

Variables

static struct usb_dwc3_cfg usb_port0
 

Function Documentation

◆ check_member() [1/2]

check_member ( usb_dwc3  ,
usb2phycfg  ,
0x100   
)

◆ check_member() [2/2]

check_member ( usb_dwc3  ,
usb3pipectl  ,
0x1c0   
)

◆ reset_usb()

static void reset_usb ( struct usb_dwc3_cfg dwc3)
static

Definition at line 62 of file usb.c.

References clock_reset_bcr(), usb_dwc3_cfg::gcc_qmpphy_bcr_reg, usb_dwc3_cfg::gcc_usb3phy_bcr_reg, usb_dwc3_cfg::qusb2phy_bcr, and usb_dwc3_cfg::usb3_bcr.

Referenced by prepare_usb(), and reset_usb0().

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

◆ reset_usb0()

void reset_usb0 ( void  )

Definition at line 75 of file usb.c.

References BIOS_INFO, printk, reset_usb(), and usb_port0.

Referenced by prepare_usb().

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

◆ setup_dwc3()

◆ setup_usb_host()

static void setup_usb_host ( struct usb_dwc3_cfg dwc3,
void board_data 
)
static

◆ setup_usb_host0()

void setup_usb_host0 ( void board_data)

Definition at line 137 of file usb.c.

References BIOS_INFO, usb_dwc3_cfg::board_data, printk, setup_usb_host(), and usb_port0.

Referenced by setup_usb().

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

Variable Documentation

◆ usb_port0

struct usb_dwc3_cfg usb_port0
static
Initial value:
= {
.usb_host_dwc3 = (void *)USB_HOST_DWC3_BASE,
.usb3_bcr = &gcc->usb30_prim_bcr,
.qusb2phy_bcr = &gcc->qusb2phy_prim_bcr,
.gcc_usb3phy_bcr_reg = &gcc->usb3_dp_phy_prim_bcr,
.gcc_qmpphy_bcr_reg = &gcc->usb3_phy_prim_bcr,
}
static struct qcs405_gcc *const gcc
Definition: clock.h:165
#define USB_HOST_DWC3_BASE
Definition: addressmap.h:47

Definition at line 44 of file usb.c.

Referenced by reset_usb0(), and setup_usb_host0().