AM261x MCU+ SDK: dwc_usb3_device_t Struct Reference

| AM261x MCU+ SDK 26.00.00 |

Data Fields
dwc_usb3_device_t Struct Reference

## Detailed Description

This structure is a wrapper that encapsulates the driver components used to manage a single DWC_usb3 controller.

## Data Fields
volatile u8 __iomem * | base
int | gasket_ofs
int | hiber_cnt
u32 | hibernate
int | pme_ready
struct dwc_usb3_pcd | pcd
u32 | snpsid
dwc_usb3_core_params_t * | core_params
dwc_usb3_core_global_regs_t __iomem * | core_global_regs
u16 | total_fifo_size
u16 | rx_fifo_size
u32 | hird_thresh
u32 | gsbuscfg0
u32 | gsbuscfg1
u16 | alt_interface
unsigned int | cmn_initialized: 1
unsigned int | gadget_initialized: 1
unsigned int | pcd_initialized: 1
unsigned int | cmn_irq_installed: 1
unsigned int | sysfs_initialized: 1
unsigned int | hiber_wait_connect: 1
unsigned int | hiber_wait_u0: 1
unsigned int | program_gsbuscfg: 1
u32 * | event_ptr [DWC_NUM_EVENT_BUFS]
u32 * | event_buf [DWC_NUM_EVENT_BUFS]
dwc_dma_t | event_buf_dma [DWC_NUM_EVENT_BUFS]
u32 | hwparams0
u32 | hwparams1
u32 | hwparams2
u32 | hwparams3
u32 | hwparams4
u32 | hwparams5
u32 | hwparams6
u32 | hwparams7
u32 | hwparams8
u32 | dcfg_save
u32 | dctl_save
u32 | gtxfifosiz0_save
u32 | gtxfifosiz1_save
u32 | gtxfifosiz2_save
u32 | gtxfifosiz3_save
u32 | grxfifosiz0_save
void(* | soft_reset_hook )(struct dwc_usb3_device *dev, int softrst, int rstor)
void(* | phy_config_hook )(struct dwc_usb3_device *dev, int softrst, int rstor)
void(* | fifo_sizing_hook )(struct dwc_usb3_device *dev, int softrst, int rstor)
void(* | gctl_init_hook )(struct dwc_usb3_device *dev, int softrst, int rstor)
void(* | set_address_hook )(struct dwc_usb3_device *dev, int softrst, int rstor)
void(* | ep0_start_hook )(struct dwc_usb3_device *dev, int softrst, int rstor)

## Field Documentation

## ◆ base

volatile u8 __iomem* dwc_usb3_device_t::base

OS-specific stuff. KEEP THIS AT THE VERY BEGINNING OF THE DEVICE STRUCT. OSes such as FreeBSD and NetBSD require this. Base address returned from ioremap()

## ◆ gasket_ofs

int dwc_usb3_device_t::gasket_ofs

Offset to 'gasket' registers (Synopsys FPGA only)

## ◆ hiber_cnt

int dwc_usb3_device_t::hiber_cnt

Count of threads inside Gadget API

## ◆ hibernate

u32 dwc_usb3_device_t::hibernate

Hibernation state

## ◆ pme_ready

int dwc_usb3_device_t::pme_ready

## ◆ pcd

struct dwc_usb3_pcd dwc_usb3_device_t::pcd

PCD structure

## ◆ snpsid

u32 dwc_usb3_device_t::snpsid

Value from SNPSID register

## ◆ core_params

dwc_usb3_core_params_t* dwc_usb3_device_t::core_params

Parameters that define how the core should be configured

## ◆ core_global_regs

dwc_usb3_core_global_regs_t __iomem* dwc_usb3_device_t::core_global_regs

Core Global registers starting at offset 100h

## ◆ event_ptr

u32* dwc_usb3_device_t::event_ptr[DWC_NUM_EVENT_BUFS]

Event Buffers for receiving interrupts. Up to 32 buffers are supported by the hardware, but we only use 1.

## ◆ event_buf

u32* dwc_usb3_device_t::event_buf[DWC_NUM_EVENT_BUFS]

## ◆ event_buf_dma

dwc_dma_t dwc_usb3_device_t::event_buf_dma[DWC_NUM_EVENT_BUFS]

## ◆ total_fifo_size

u16 dwc_usb3_device_t::total_fifo_size

Total RAM for FIFOs (Bytes)

## ◆ rx_fifo_size

u16 dwc_usb3_device_t::rx_fifo_size

Size of Rx FIFO (Bytes)

## ◆ hwparams0

u32 dwc_usb3_device_t::hwparams0

Hardware Configuration - stored here for convenience

## ◆ hwparams1

u32 dwc_usb3_device_t::hwparams1

## ◆ hwparams2

u32 dwc_usb3_device_t::hwparams2

## ◆ hwparams3

u32 dwc_usb3_device_t::hwparams3

## ◆ hwparams4

u32 dwc_usb3_device_t::hwparams4

## ◆ hwparams5

u32 dwc_usb3_device_t::hwparams5

## ◆ hwparams6

u32 dwc_usb3_device_t::hwparams6

## ◆ hwparams7

u32 dwc_usb3_device_t::hwparams7

## ◆ hwparams8

u32 dwc_usb3_device_t::hwparams8

## ◆ dcfg_save

u32 dwc_usb3_device_t::dcfg_save

Register state, saved across core hibernation

## ◆ dctl_save

u32 dwc_usb3_device_t::dctl_save

## ◆ gtxfifosiz0_save

u32 dwc_usb3_device_t::gtxfifosiz0_save

## ◆ gtxfifosiz1_save

u32 dwc_usb3_device_t::gtxfifosiz1_save

## ◆ gtxfifosiz2_save

u32 dwc_usb3_device_t::gtxfifosiz2_save

## ◆ gtxfifosiz3_save

u32 dwc_usb3_device_t::gtxfifosiz3_save

## ◆ grxfifosiz0_save

u32 dwc_usb3_device_t::grxfifosiz0_save

## ◆ soft_reset_hook

void(* dwc_usb3_device_t::soft_reset_hook) (struct dwc_usb3_device *dev, int softrst, int rstor)

Hooks for customizing device initialization. See dwc_usb3_pcd_device_init() in cil.c to see how these work.

## ◆ phy_config_hook

void(* dwc_usb3_device_t::phy_config_hook) (struct dwc_usb3_device *dev, int softrst, int rstor)

## ◆ fifo_sizing_hook

void(* dwc_usb3_device_t::fifo_sizing_hook) (struct dwc_usb3_device *dev, int softrst, int rstor)

## ◆ gctl_init_hook

void(* dwc_usb3_device_t::gctl_init_hook) (struct dwc_usb3_device *dev, int softrst, int rstor)

## ◆ set_address_hook

void(* dwc_usb3_device_t::set_address_hook) (struct dwc_usb3_device *dev, int softrst, int rstor)

## ◆ ep0_start_hook

void(* dwc_usb3_device_t::ep0_start_hook) (struct dwc_usb3_device *dev, int softrst, int rstor)

## ◆ hird_thresh

u32 dwc_usb3_device_t::hird_thresh

Value to write into the DCTL HIRD_Thresh field on register initialization. If 0 then a default value of 0x1c will be used.

## ◆ gsbuscfg0

u32 dwc_usb3_device_t::gsbuscfg0

Values to write into GSBUSCFG0 and GSBUSCFG1 on initialization or when exiting from hibernation. 'program_gsbuscfg' below must also be set to 1 to enable the writing of these values.

## ◆ gsbuscfg1

u32 dwc_usb3_device_t::gsbuscfg1

## ◆ alt_interface

u16 dwc_usb3_device_t::alt_interface

## ◆ cmn_initialized

unsigned int dwc_usb3_device_t::cmn_initialized

True if common functionality has been initialized

## ◆ gadget_initialized

unsigned int dwc_usb3_device_t::gadget_initialized

True if Gadget has been initialized

## ◆ pcd_initialized

unsigned int dwc_usb3_device_t::pcd_initialized

True if PCD has been initialized

## ◆ cmn_irq_installed

unsigned int dwc_usb3_device_t::cmn_irq_installed

True if common IRQ handler has been installed

## ◆ sysfs_initialized

unsigned int dwc_usb3_device_t::sysfs_initialized

True if sysfs functions have been installed

## ◆ hiber_wait_connect

unsigned int dwc_usb3_device_t::hiber_wait_connect

True if waiting for connect before resuming from hibernation

## ◆ hiber_wait_u0

unsigned int dwc_usb3_device_t::hiber_wait_u0

True if waiting for U0 state before sending remote wake

## ◆ program_gsbuscfg

unsigned int dwc_usb3_device_t::program_gsbuscfg

True if GBUSCFG0/GBUSCFG1 should be written with the above values when exiting hibernation