Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

dwc_otg_adp.c File Reference

This file contains the most of the Attach Detect Protocol implementation for the driver to support OTG Rev2.0. More...

#include "dwc_os.h"
#include "dwc_otg_regs.h"
#include "dwc_otg_cil.h"
#include "dwc_otg_adp.h"

Go to the source code of this file.

Functions

void dwc_otg_adp_write_reg (dwc_otg_core_if_t *core_if, uint32_t value)
 Attach Detect Protocol functions.
uint32_t dwc_otg_adp_read_reg (dwc_otg_core_if_t *core_if)
 Function is called to read ADP registers.
uint32_t dwc_otg_adp_read_reg_filter (dwc_otg_core_if_t *core_if)
 Function is called to read ADPCTL register and filter Write-clear bits.
void dwc_otg_adp_modify_reg (dwc_otg_core_if_t *core_if, uint32_t clr, uint32_t set)
 Function is called to write ADP registers.
void adp_sense_timeout (void *ptr)
void adp_vbuson_timeout (void *ptr)
 This function is called when the ADP vbus timer expires.
void dwc_otg_adp_vbuson_timer_start (dwc_otg_core_if_t *core_if)
 Start the ADP Initial Probe timer to detect if Port Connected interrupt is not asserted within 1.1 seconds.
uint32_t dwc_otg_adp_probe_start (dwc_otg_core_if_t *core_if)
 Starts the ADP Probing.
void dwc_otg_adp_sense_timer_start (dwc_otg_core_if_t *core_if)
 Starts the ADP Sense timer to detect if ADP Sense interrupt is not asserted within 3 seconds.
uint32_t dwc_otg_adp_sense_start (dwc_otg_core_if_t *core_if)
 Starts the ADP Sense.
uint32_t dwc_otg_adp_probe_stop (dwc_otg_core_if_t *core_if)
 Stops the ADP Probing.
uint32_t dwc_otg_adp_sense_stop (dwc_otg_core_if_t *core_if)
 Stops the ADP Sensing.
void dwc_otg_adp_turnon_vbus (dwc_otg_core_if_t *core_if)
 Called to turn on the VBUS after initial ADP probe in host mode.
void dwc_otg_adp_start (dwc_otg_core_if_t *core_if, uint8_t is_host)
 Called right after driver is loaded to perform initial actions for ADP.
void dwc_otg_adp_init (dwc_otg_core_if_t *core_if)
void dwc_otg_adp_remove (dwc_otg_core_if_t *core_if)
uint32_t set_timer_value (dwc_otg_core_if_t *core_if, uint32_t val)
 This function sets Ramp Timer values.
uint32_t compare_timer_values (dwc_otg_core_if_t *core_if)
 This function compares Ramp Timer values.
int32_t dwc_otg_adp_handle_prb_intr (dwc_otg_core_if_t *core_if, uint32_t val)
 This function handles ADP Probe Interrupts.
int32_t dwc_otg_adp_handle_sns_intr (dwc_otg_core_if_t *core_if)
 This function hadles ADP Sense Interrupt.
int32_t dwc_otg_adp_handle_prb_tmout_intr (dwc_otg_core_if_t *core_if, uint32_t val)
 This function handles ADP Probe Interrupts.
int32_t dwc_otg_adp_handle_intr (dwc_otg_core_if_t *core_if)
 ADP Interrupt handler.
int32_t dwc_otg_adp_handle_srp_intr (dwc_otg_core_if_t *core_if)


Detailed Description

This file contains the most of the Attach Detect Protocol implementation for the driver to support OTG Rev2.0.

Definition in file dwc_otg_adp.c.


Function Documentation

void adp_vbuson_timeout void *  ptr  )  [static]
 

This function is called when the ADP vbus timer expires.

Timeout is 1.1s.

Definition at line 119 of file dwc_otg_adp.c.

void dwc_otg_adp_vbuson_timer_start dwc_otg_core_if_t core_if  ) 
 

Start the ADP Initial Probe timer to detect if Port Connected interrupt is not asserted within 1.1 seconds.

Parameters:
core_if the pointer to core_if strucure.

Definition at line 187 of file dwc_otg_adp.c.

uint32_t dwc_otg_adp_probe_start dwc_otg_core_if_t core_if  ) 
 

Starts the ADP Probing.

Parameters:
core_if the pointer to core_if structure.

Definition at line 296 of file dwc_otg_adp.c.

void dwc_otg_adp_sense_timer_start dwc_otg_core_if_t core_if  ) 
 

Starts the ADP Sense timer to detect if ADP Sense interrupt is not asserted within 3 seconds.

Parameters:
core_if the pointer to core_if strucure.

Definition at line 346 of file dwc_otg_adp.c.

uint32_t dwc_otg_adp_sense_start dwc_otg_core_if_t core_if  ) 
 

Starts the ADP Sense.

Parameters:
core_if the pointer to core_if strucure.

Definition at line 357 of file dwc_otg_adp.c.

uint32_t dwc_otg_adp_probe_stop dwc_otg_core_if_t core_if  ) 
 

Stops the ADP Probing.

Parameters:
core_if the pointer to core_if strucure.

Definition at line 393 of file dwc_otg_adp.c.

uint32_t dwc_otg_adp_sense_stop dwc_otg_core_if_t core_if  ) 
 

Stops the ADP Sensing.

Parameters:
core_if the pointer to core_if strucure.

Definition at line 416 of file dwc_otg_adp.c.

void dwc_otg_adp_turnon_vbus dwc_otg_core_if_t core_if  ) 
 

Called to turn on the VBUS after initial ADP probe in host mode.

If port power was already enabled in cil_hcd_start function then only schedule a timer.

Parameters:
core_if the pointer to core_if structure.

Definition at line 437 of file dwc_otg_adp.c.

void dwc_otg_adp_start dwc_otg_core_if_t core_if,
uint8_t  is_host
 

Called right after driver is loaded to perform initial actions for ADP.

Parameters:
core_if the pointer to core_if structure.
is_host - flag for current mode of operation either from GINTSTS or GPWRDN

Definition at line 458 of file dwc_otg_adp.c.

int32_t dwc_otg_adp_handle_srp_intr dwc_otg_core_if_t core_if  ) 
 

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 792 of file dwc_otg_adp.c.


Generated on Thu Oct 27 03:56:38 2011 for DesignWare USB 2.0 OTG Controller (DWC_otg) Device Driver by  doxygen 1.3.9.1