These routines handle initialization of the CIL and PCD driver components and the DWC_usb3 controller.
◆ dwc_usb3_pcd_init()
| int dwc_usb3_pcd_init |
( |
volatile struct dwc_usb3_device * |
dev | ) |
|
◆ dwc_usb3_pcd_remove()
| void dwc_usb3_pcd_remove |
( |
volatile struct dwc_usb3_device * |
dev | ) |
|
◆ dwc_usb3_pcd_check_snpsid()
This routine ensures the device is really a DWC_usb3 controller, by reading and verifying the SNPSID register contents. The value should be 0x5533XXXX, which corresponds to "U3", as in "USB3 version X.XXX".
The SNPSID value is also saved in dev->snpsid for later use in determining if any version-specific operations need to be performed.
This routine should be called before any other initialization routines, to ensure that the dev->snpsid value is set in case any of the other routines need it.
- Parameters
-
| dev | Programming view of DWC_usb3 controller. |
| addr_ofs | Offset to the Device registers in the CSR space. It is needed because this routine is called early, before the normal register access routines are functional. |
- Returns
- 0 if the SNPSID value is valid, -DWC_E_INVALID if not.
◆ dwc_usb3_pcd_common_init()
This routine is called to initialize the DWC_usb3 CSR data structures. The register addresses in the device structures are initialized from the base address supplied by the caller. The calling routine must make the OS calls to get the base address of the DWC_usb3 controller registers. The core_params argument holds the parameters that specify how the core should be configured.
- Parameters
-
| dev | Programming view of DWC_usb3 controller. |
| base | Base address of DWC_usb3 core registers. |
| core_params | Pointer to the core configuration parameters. |
- Returns
- 0 on success, negative error code on failure
◆ dwc_usb3_pcd_common_remove()
◆ dwc_usb3_pcd_device_init()
| void dwc_usb3_pcd_device_init |
( |
volatile dwc_usb3_device_t * |
dev, |
|
|
int |
soft_reset, |
|
|
int |
restore |
|
) |
| |
This routine initializes the DWC_usb3 controller registers.
If the soft_reset parameter is true, then this routine must be called in a context that allows dwc_msleep() to be used, because that function is called while waiting for the core to come out of reset.
This routine is called by dwc_usb3_pcd_init() when the driver is loaded, so it normally does not need to be called separately, except in special circumstances, such as when exiting from hibernation.
- Parameters
-
| dev | Programming view of DWC_usb3 controller. |
| soft_reset | True if doing a soft reset of the core. |
| restore | True if restoring register state after hibernation. |
◆ dwc_usb3_pcd_device_remove()
This routine deinitializes the DWC_usb3 controller registers.
This routine is called by dwc_usb3_pcd_remove() when the driver is unloaded, so it normally does not need to be called separately,
- Parameters
-
| dev | Programming view of DWC_usb3 controller. |