usbpsu
Xilinx SDK Drivers API Documentation
xusbpsu_hibernation.c File Reference

Overview

This patch adds hibernation support to usbpsu driver when dwc3 is operating as a gadget.

MODIFICATION HISTORY:
Ver    Who    Date     Changes

1.0 Mayank 12/01/18 First release
 

Functions

s32 XUsbPsu_SendGadgetGenericCmd (struct XUsbPsu *InstancePtr, u32 cmd, u32 param)
 Send generic command for gadget. More...
 
s32 XUsbPsu_SetupScratchpad (struct XUsbPsu *InstancePtr)
 Sets scratchpad buffers. More...
 
void XUsbPsu_InitHibernation (struct XUsbPsu *InstancePtr)
 Initialize to handle hibernation event when it comes. More...
 
void Xusbpsu_HibernationIntr (struct XUsbPsu *InstancePtr)
 Handle hibernation event. More...
 
void XUsbPsu_WakeupIntr (struct XUsbPsu *InstancePtr)
 Handle wakeup event. More...
 

Function Documentation

◆ Xusbpsu_HibernationIntr()

void Xusbpsu_HibernationIntr ( struct XUsbPsu InstancePtr)

Handle hibernation event.

Parameters
InstancePtris a pointer to the XUsbPsu instance to be worked on.
Returns
none
Note
None.

References XUsbPsu_GetLinkState().

◆ XUsbPsu_InitHibernation()

void XUsbPsu_InitHibernation ( struct XUsbPsu InstancePtr)

Initialize to handle hibernation event when it comes.

Parameters
InstancePtris a pointer to the XUsbPsu instance to be worked on.
Returns
none
Note
None.

References XUsbPsu::IsHibernated.

◆ XUsbPsu_SendGadgetGenericCmd()

s32 XUsbPsu_SendGadgetGenericCmd ( struct XUsbPsu InstancePtr,
u32  cmd,
u32  param 
)

Send generic command for gadget.

Parameters
InstancePtris a pointer to the XUsbPsu instance to be worked on.
cmdis command to be sent
paramis parameter for the command, to be written in DGCMDPAR register
Returns
  • XST_SUCCESS on success
  • XST_FAILURE on timeout
  • XST_REGISTER_ERROR on status error
Note
None.

References XUsbPsu_WriteReg.

Referenced by XUsbPsu_SetupScratchpad().

◆ XUsbPsu_SetupScratchpad()

s32 XUsbPsu_SetupScratchpad ( struct XUsbPsu InstancePtr)

Sets scratchpad buffers.

Parameters
InstancePtris a pointer to the XUsbPsu instance to be worked on.
Returns
XST_SUCCESS on success or else error code
Note
None.

References XUsbPsu_SendGadgetGenericCmd().

◆ XUsbPsu_WakeupIntr()

void XUsbPsu_WakeupIntr ( struct XUsbPsu InstancePtr)

Handle wakeup event.

Parameters
InstancePtris a pointer to the XUsbPsu instance to be worked on.
Returns
none
Note
None.

References XUsbPsu_ReadLpdReg.