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

dwc_otg_cil_intr.c File Reference

The Core Interface Layer provides basic services for accessing and managing the DWC_otg hardware. More...

#include "dwc_os.h"
#include "dwc_otg_regs.h"
#include "dwc_otg_cil.h"
#include "dwc_otg_driver.h"
#include "dwc_otg_pcd.h"
#include "dwc_otg_hcd.h"

Go to the source code of this file.

Defines

#define CLEAR_GPWRDN_INTR(__core_if, __intr)

Functions

int32_t dwc_otg_handle_mode_mismatch_intr (dwc_otg_core_if_t *core_if)
 This function will log a debug message.
int32_t dwc_otg_handle_otg_intr (dwc_otg_core_if_t *core_if)
 This function handles the OTG Interrupts.
void w_conn_id_status_change (void *p)
int32_t dwc_otg_handle_conn_id_status_change_intr (dwc_otg_core_if_t *core_if)
 This function handles the Connector ID Status Change Interrupt.
int32_t dwc_otg_handle_session_req_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that a device is initiating the Session Request Protocol to request the host to turn on bus power so a new session can begin.
void w_wakeup_detected (void *p)
int32_t dwc_otg_handle_wakeup_detected_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that the DWC_otg controller has detected a resume or remote wakeup sequence.
int32_t dwc_otg_handle_pwrdn_disconnect_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that the Wakeup Logic has detected a Device disconnect.
int32_t dwc_otg_handle_pwrdn_wakeup_detected_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that the Wakeup Logic has detected a remote wakeup sequence.
int32_t dwc_otg_handle_pwrdn_idsts_change (dwc_otg_device_t *otg_dev)
int32_t dwc_otg_handle_pwrdn_session_change (dwc_otg_core_if_t *core_if)
uint32_t dwc_otg_handle_pwrdn_stschng_intr (dwc_otg_device_t *otg_dev)
 This interrupt indicates that the Wakeup Logic has detected a status change either on IDDIG or BSessVld.
int32_t dwc_otg_handle_pwrdn_srp_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that the Wakeup Logic has detected a SRP.
int32_t dwc_otg_handle_restore_done_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that restore command after Hibernation was completed by the core.
int32_t dwc_otg_handle_disconnect_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that a device has been disconnected from the root port.
int32_t dwc_otg_handle_usb_suspend_intr (dwc_otg_core_if_t *core_if)
 This interrupt indicates that SUSPEND state has been detected on the USB.
uint32_t dwc_otg_read_common_intr (dwc_otg_core_if_t *core_if)
 This function returns the Core Interrupt register.
int32_t dwc_otg_handle_common_intr (void *dev)
 This function should be called on every hardware interrupt.


Detailed Description

The Core Interface Layer provides basic services for accessing and managing the DWC_otg hardware.

These services are used by both the Host Controller Driver and the Peripheral Controller Driver.

This file contains the Common Interrupt handlers.

Definition in file dwc_otg_cil_intr.c.


Define Documentation

#define CLEAR_GPWRDN_INTR __core_if,
__intr   ) 
 

Value:

do { \
                gpwrdn_data_t gpwrdn = {.d32=0}; \
                gpwrdn.b.__intr = 1; \
                DWC_MODIFY_REG32(&__core_if->core_global_regs->gpwrdn, \
                0, gpwrdn.d32); \
} while (0)

Definition at line 1252 of file dwc_otg_cil_intr.c.


Function Documentation

int32_t dwc_otg_handle_mode_mismatch_intr dwc_otg_core_if_t core_if  ) 
 

This function will log a debug message.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 64 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_otg_intr dwc_otg_core_if_t core_if  ) 
 

This function handles the OTG Interrupts.

It reads the OTG Interrupt Register (GOTGINT) to determine what interrupt has occurred.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 84 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_conn_id_status_change_intr dwc_otg_core_if_t core_if  ) 
 

This function handles the Connector ID Status Change Interrupt.

It reads the OTG Interrupt Register (GOTCTL) to determine whether this is a Device to Host Mode transition or a Host Mode to Device Transition.

This only occurs when the cable is connected/removed from the PHY connector.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 319 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_session_req_intr dwc_otg_core_if_t core_if  ) 
 

This interrupt indicates that a device is initiating the Session Request Protocol to request the host to turn on bus power so a new session can begin.

The handler responds by turning on bus power. If the DWC_otg controller is in low power mode, the handler brings the controller out of low power mode before turning on bus power.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 366 of file dwc_otg_cil_intr.c.

void w_wakeup_detected void *  p  ) 
 

Change to L0 state

Definition at line 398 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_wakeup_detected_intr dwc_otg_core_if_t core_if  ) 
 

This interrupt indicates that the DWC_otg controller has detected a resume or remote wakeup sequence.

If the DWC_otg controller is in low power mode, the handler must brings the controller out of low power mode. The controller automatically begins resume signaling. The handler schedules a time to stop resume signaling.

Change to L0 state

Change to L0 state

Definition at line 434 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_disconnect_intr dwc_otg_core_if_t core_if  ) 
 

This interrupt indicates that a device has been disconnected from the root port.

Todo:
Consolidate this if statement.

Definition at line 933 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_usb_suspend_intr dwc_otg_core_if_t core_if  ) 
 

This interrupt indicates that SUSPEND state has been detected on the USB.

For HNP the USB Suspend interrupt signals the change from "a_peripheral" to "a_host".

When power management is enabled the core will be put in low power mode.

Definition at line 1015 of file dwc_otg_cil_intr.c.

uint32_t dwc_otg_read_common_intr dwc_otg_core_if_t core_if  )  [inline, static]
 

This function returns the Core Interrupt register.

Todo:
: The port interrupt occurs while in device mode. Added code to CIL to clear the interrupt for now!

Definition at line 1211 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_common_intr void *  dev  ) 
 

This function should be called on every hardware interrupt.

The common interrupts are those that occur in both Host and Device mode. This handler handles the following interrupts:

  • Mode Mismatch Interrupt
  • Disconnect Interrupt
  • OTG Interrupt
  • Connector ID Status Change Interrupt
  • Session Request Interrupt.
  • Resume / Remote Wakeup Detected Interrupt.
  • LPM Transaction Received Interrupt
  • ADP Transaction Received Interrupt

Definition at line 1275 of file dwc_otg_cil_intr.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