EDMA3 Driver Interface Definition


Data Structures

struct  EDMA3_DRV_GblConfigParams
 Init-time Configuration structure for EDMA3 controller, to provide Global SoC specific Information. More...
struct  EDMA3_DRV_InstanceInitConfig
 Init-time Region Specific Configuration structure for EDMA3 Driver, to provide region specific Information. More...
struct  EDMA3_DRV_InitConfig
 Used to Initialize the EDMA3 Driver Instance. More...
struct  EDMA3_DRV_MiscParam
 Used to specify the miscellaneous options during EDMA3 Driver Initialization. More...

Modules

 EDMA3 Driver Usage Guidelines
 EDMA3 Driver Error Codes
 Usage of EDMA3 Driver.
 EDMA3 Driver Channel Setup
 EDMA3 Driver Typical EDMA Transfer Setup
 EDMA3 Driver Optional Setup for EDMA

Defines

#define EDMA3_DRV_CH_NO_PARAM_MAP   EDMA3_RM_CH_NO_PARAM_MAP
#define EDMA3_DRV_CH_NO_TCC_MAP   EDMA3_RM_CH_NO_TCC_MAP

Functions

EDMA3_DRV_Result EDMA3_DRV_create (unsigned int phyCtrllerInstId, const EDMA3_DRV_GblConfigParams *gblCfgParams, const void *miscParam)
 Create EDMA3 Driver Object.
EDMA3_DRV_Result EDMA3_DRV_delete (unsigned int phyCtrllerInstId, const void *param)
 Delete EDMA3 Driver Object.
EDMA3_DRV_Handle EDMA3_DRV_open (unsigned int phyCtrllerInstId, const EDMA3_DRV_InitConfig *initCfg, EDMA3_DRV_Result *errorCode)
 Open EDMA3 Driver Instance.
EDMA3_DRV_Result EDMA3_DRV_close (EDMA3_DRV_Handle hEdma, const void *param)
 Close the EDMA3 Driver Instance.

Detailed Description

Top-level Encapsulation of all documentation for EDMA3 Driver

Define Documentation

#define EDMA3_DRV_CH_NO_PARAM_MAP   EDMA3_RM_CH_NO_PARAM_MAP

This define is used to specify that a DMA channel is NOT tied to any PaRAM Set and hence any available PaRAM Set could be used for that DMA channel. It could be used in dmaChannelPaRAMMap [EDMA3_MAX_DMA_CH], in global configuration structure EDMA3_RM_GblConfigParams.

This value should mandatorily be used to mark DMA channels with no initial mapping to specific PaRAM Sets.

Referenced by EDMA3_DRV_requestChannel().

#define EDMA3_DRV_CH_NO_TCC_MAP   EDMA3_RM_CH_NO_TCC_MAP

This define is used to specify that the DMA/QDMA channel is not tied to any TCC and hence any available TCC could be used for that DMA/QDMA channel. It could be used in dmaChannelTccMap [EDMA3_MAX_DMA_CH], in global configuration structure EDMA3_RM_GblConfigParams.

This value should mandatorily be used to mark DMA channels with no initial mapping to specific TCCs.

Referenced by EDMA3_DRV_requestChannel().


Function Documentation

EDMA3_DRV_Result EDMA3_DRV_close ( EDMA3_DRV_Handle  hEdma,
const void *  param 
)

Close the EDMA3 Driver Instance.

This API is used to close a previously opened EDMA3 Driver Instance.

Parameters:
hEdma [IN] Handle to the previously opened EDMA3 Driver Instance.
param [IN] For possible future use
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error code
Note:
This function disables the global interrupts (by calling API edma3OsProtectEntry with protection level EDMA3_OS_PROTECT_INTERRUPT) while modifying the global data structures, to make it re-entrant.

References EDMA3_DRV_Instance::drvInstInitConfig, EDMA3_DRV_CLOSED, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_E_OBJ_NOT_OPENED, EDMA3_DRV_E_RM_CLOSE_FAIL, EDMA3_DRV_OPENED, EDMA3_DRV_Object::numOpens, EDMA3_DRV_Instance::pDrvObjectHandle, EDMA3_DRV_Object::phyCtrllerInstId, EDMA3_DRV_Instance::resMgrInstance, EDMA3_DRV_Instance::shadowRegs, and EDMA3_DRV_Object::state.

EDMA3_DRV_Result EDMA3_DRV_create ( unsigned int  phyCtrllerInstId,
const EDMA3_DRV_GblConfigParams gblCfgParams,
const void *  miscParam 
)

Create EDMA3 Driver Object.

This API is used to create the EDMA3 Driver Object. It should be called only ONCE for each EDMA3 hardware instance.

Init-time Configuration structure for EDMA3 hardware is provided to pass the SoC specific information. This configuration information could be provided by the user at init-time. In case user doesn't provide it, this information could be taken from the SoC specific configuration file edma3_<SOC_NAME>_cfg.c, in case it is available.

This API clears the error specific registers (EMCR/EMCRh, QEMCR, CCERRCLR) and sets the TCs priorities and Event Queues' watermark levels, if the 'miscParam' argument is NULL. User can avoid these registers' programming (in some specific use cases) by SETTING the 'isSlave' field of 'EDMA3_RM_MiscParam' configuration structure and passing this structure as the third argument (miscParam).

After successful completion of this API, Driver Object's state changes to EDMA3_DRV_CREATED from EDMA3_DRV_DELETED.

Parameters:
phyCtrllerInstId [IN] EDMA3 Controller Instance Id (Hardware instance id, starting from 0).
gblCfgParams [IN] SoC specific configuration structure for the EDMA3 Hardware.
miscParam [IN] Misc configuration options provided in the structure 'EDMA3_DRV_MiscParam'. For default options, user can pass NULL in this argument.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error code

Used to reset the Internal EDMA3 Driver Data Structures for the first time.

We are NOT checking 'gblCfgParams' for NULL. Whatever user has passed is given to RM. If user passed NULL, config info from config file will be taken else user specific info will be passed to the RM. Similarly, 'miscParam' is not being checked and passed as it is to the Resource Manager layer.

Copy the global config info from the RM object to the driver object for future use.

References EDMA3_DRV_CREATED, EDMA3_DRV_DELETED, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_E_OBJ_NOT_DELETED, EDMA3_DRV_TRIG_MODE_NONE, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_Object::numOpens, EDMA3_DRV_GblConfigParams::numRegions, EDMA3_DRV_ChBoundResources::paRAMId, EDMA3_DRV_Object::phyCtrllerInstId, EDMA3_DRV_Object::state, EDMA3_DRV_ChBoundResources::tcc, and EDMA3_DRV_ChBoundResources::trigMode.

EDMA3_DRV_Result EDMA3_DRV_delete ( unsigned int  phyCtrllerInstId,
const void *  param 
)

Delete EDMA3 Driver Object.

Use this API to delete the EDMA3 Driver Object. It should be called only ONCE for each EDMA3 hardware instance. It should be called ONLY after closing all the EDMA3 Driver Instances.

This API is used to delete the EDMA3 Driver Object. It should be called once for each EDMA3 hardware instance, ONLY after closing all the previously opened EDMA3 Driver Instances.

After successful completion of this API, Driver Object's state changes to EDMA3_DRV_DELETED.

Parameters:
phyCtrllerInstId [IN] EDMA3 Phy Controller Instance Id (Hardware instance id, starting from 0).
param [IN] For possible future use.
Returns:
EDMA3_DRV_SOK or EDMA3_DRV Error code

If number of Driver Instances is 0, then state should be EDMA3_DRV_CLOSED OR EDMA3_DRV_CREATED.

If number of Driver Instances is NOT 0, then this function SHOULD NOT be called by anybody.

State is correct. Delete the RM Object.

Change state to EDMA3_DRV_DELETED

References EDMA3_DRV_CLOSED, EDMA3_DRV_CREATED, EDMA3_DRV_DELETED, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_E_INVALID_STATE, EDMA3_DRV_E_OBJ_NOT_CLOSED, and EDMA3_DRV_Object::state.

EDMA3_DRV_Handle EDMA3_DRV_open ( unsigned int  phyCtrllerInstId,
const EDMA3_DRV_InitConfig initCfg,
EDMA3_DRV_Result *  errorCode 
)

Open EDMA3 Driver Instance.

This API is used to open an EDMA3 Driver Instance. It could be called multiple times, for each possible EDMA3 shadow region. Maximum EDMA3_MAX_REGIONS instances are allowed for each EDMA3 hardware instance. Multiple instances on the same shadow region are NOT allowed.

Also, only ONE Master Driver Instance is permitted. This master instance (and hence the region to which it belongs) will only receive the EDMA3 interrupts, if enabled.

User could pass the instance specific configuration structure (initCfg.drvInstInitConfig) as a part of the 'initCfg' structure, during init-time. In case user doesn't provide it, this information could be taken from the SoC specific configuration file edma3_<SOC_NAME>_cfg.c, in case it is available.

By default, this EDMA3 Driver instance will clear the PaRAM Sets while allocating them. To change the default behavior, user should use the IOCTL interface appropriately.

Parameters:
phyCtrllerInstId [IN] EDMA3 Controller Instance Id (Hardware instance id, starting from 0).
initCfg [IN] Used to Initialize the EDMA3 Driver Instance (Master or Slave).
errorCode [OUT] Error code while opening DRV instance.
Returns:
EDMA3_DRV_Handle : If successfully opened, the API will return the associated driver's instance handle.
Note:
This function disables the global interrupts (by calling API edma3OsProtectEntry with protection level EDMA3_OS_PROTECT_INTERRUPT) while modifying the global data structures, to make it re-entrant.
This API is used to open an EDMA3 Driver Instance. It could be called multiple times, for each possible EDMA3 shadow region. Maximum EDMA3_MAX_REGIONS instances are allowed for each EDMA3 hardware instance. Multiple instances on the same shadow region are NOT allowed.

Also, only ONE Master Driver Instance is permitted. This master instance (and hence the region to which it belongs) will only receive the EDMA3 interrupts, if enabled.

User could pass the instance specific configuration structure (initCfg.drvInstInitConfig) as a part of the 'initCfg' structure, during init-time. In case user doesn't provide it, this information could be taken from the SoC specific configuration file edma3_<SOC_NAME>_cfg.c, in case it is available.

Parameters:
phyCtrllerInstId [IN] EDMA3 Controller Instance Id (Hardware instance id, starting from 0).
initCfg [IN] Used to Initialize the EDMA3 Driver Instance (Master or Slave).
errorCode [OUT] Error code while opening DRV instance.
Returns:
EDMA3_DRV_Handle : If successfully opened, the API will return the associated driver's instance handle.
Note:
This function disables the global interrupts (by calling API edma3OsProtectEntry with protection level EDMA3_OS_PROTECT_INTERRUPT) while modifying the global data structures, to make it re-entrant.

References EDMA3_DRV_Instance::drvInstInitConfig, EDMA3_DRV_InitConfig::drvInstInitConfig, EDMA3_DRV_Instance::drvSemHandle, EDMA3_DRV_InitConfig::drvSemHandle, EDMA3_DRV_CLOSED, EDMA3_DRV_CREATED, EDMA3_DRV_E_INST_ALREADY_EXISTS, EDMA3_DRV_E_INVALID_PARAM, EDMA3_DRV_E_INVALID_STATE, EDMA3_DRV_OPENED, EDMA3_DRV_Object::gblCfgParams, EDMA3_DRV_InitConfig::gblerrCb, EDMA3_DRV_Instance::gblerrCbParams, EDMA3_DRV_InitConfig::gblerrData, EDMA3_DRV_GblConfigParams::globalRegs, EDMA3_DRV_InitConfig::isMaster, EDMA3_DRV_Instance::isMaster, EDMA3_DRV_Object::numOpens, EDMA3_DRV_GblConfigParams::numRegions, EDMA3_DRV_Instance::pDrvObjectHandle, EDMA3_DRV_Instance::regionId, EDMA3_DRV_InitConfig::regionId, EDMA3_DRV_Instance::shadowRegs, and EDMA3_DRV_Object::state.


Generated on Tue Jul 7 19:18:47 2009 for EDMA3 Driver by  doxygen 1.5.9