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"

Go to the source code of this file.

Functions

int32_t dwc_otg_handle_mode_mismatch_intr (dwc_otg_core_if_t *core_if)
 This function will log a debug message.
static void hcd_start (dwc_otg_core_if_t *core_if)
 Start the HCD.
static void hcd_stop (dwc_otg_core_if_t *core_if)
 Stop the HCD.
static void hcd_disconnect (dwc_otg_core_if_t *core_if)
 Disconnect the HCD.
static void hcd_session_start (dwc_otg_core_if_t *core_if)
 Inform the HCD the a New Session has begun.
static void hcd_resume (dwc_otg_core_if_t *core_if)
 Resume the HCD.
static void pcd_start (dwc_otg_core_if_t *core_if)
 Start the PCD.
static void pcd_stop (dwc_otg_core_if_t *core_if)
 Stop the PCD.
static void pcd_suspend (dwc_otg_core_if_t *core_if)
 Suspend the PCD.
static void pcd_resume (dwc_otg_core_if_t *core_if)
 Resume the PCD.
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_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.
static 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 (dwc_otg_core_if_t *core_if)
 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.


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 61 of file dwc_otg_cil_intr.c.

static void hcd_start ( dwc_otg_core_if_t core_if  )  [inline, static]

Start the HCD.

Helper function for using the HCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 78 of file dwc_otg_cil_intr.c.

static void hcd_stop ( dwc_otg_core_if_t core_if  )  [inline, static]

Stop the HCD.

Helper function for using the HCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 89 of file dwc_otg_cil_intr.c.

static void hcd_disconnect ( dwc_otg_core_if_t core_if  )  [inline, static]

Disconnect the HCD.

Helper function for using the HCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 100 of file dwc_otg_cil_intr.c.

static void hcd_session_start ( dwc_otg_core_if_t core_if  )  [inline, static]

Inform the HCD the a New Session has begun.

Helper function for using the HCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 112 of file dwc_otg_cil_intr.c.

static void hcd_resume ( dwc_otg_core_if_t core_if  )  [inline, static]

Resume the HCD.

Helper function for using the HCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 138 of file dwc_otg_cil_intr.c.

static void pcd_start ( dwc_otg_core_if_t core_if  )  [inline, static]

Start the PCD.

Helper function for using the PCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 149 of file dwc_otg_cil_intr.c.

static void pcd_stop ( dwc_otg_core_if_t core_if  )  [inline, static]

Stop the PCD.

Helper function for using the PCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 160 of file dwc_otg_cil_intr.c.

static void pcd_suspend ( dwc_otg_core_if_t core_if  )  [inline, static]

Suspend the PCD.

Helper function for using the PCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 171 of file dwc_otg_cil_intr.c.

static void pcd_resume ( dwc_otg_core_if_t core_if  )  [inline, static]

Resume the PCD.

Helper function for using the PCD callbacks.

Parameters:
core_if Programming view of DWC_otg controller.

Definition at line 182 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 196 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 399 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 441 of file dwc_otg_cil_intr.c.

void w_wakeup_detected ( void *  p  ) 

Definition at line 473 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 510 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 589 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 649 of file dwc_otg_cil_intr.c.

static 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 752 of file dwc_otg_cil_intr.c.

int32_t dwc_otg_handle_common_intr ( dwc_otg_core_if_t core_if  ) 

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:

Definition at line 800 of file dwc_otg_cil_intr.c.


Generated on Tue May 5 02:22:49 2009 for DesignWare USB 2.0 OTG Controller (DWC_otg) Device Driver by  doxygen 1.4.7