Interface Definition for EDMA3 Resource Manager Layer
[EDMA3 Interrupt Manager Interface]


Data Structures

struct  EDMA3_RM_GblConfigParams
 Init-time Configuration structure for EDMA3 controller, to provide Global SoC specific Information. More...
struct  EDMA3_RM_InstanceInitConfig
 Init-time Region Specific Configuration structure for EDMA3 RM, to provide region specific Information. More...
struct  EDMA3_RM_Param
 Used to Initialize the Resource Manager Instance. More...
struct  EDMA3_RM_MiscParam
 Used to specify the miscellaneous options during Resource Manager Initialization. More...

Modules

 EDMA3 Resource Manager Usage Guidelines
 Error Codes
 Usage of Resource Manager.

Typedefs

typedef unsigned int EDMA3_RM_RegionId
 EDMA3 Region Id.
typedef unsigned int EDMA3_RM_EventQueue
 EDMA3 Event Queue assignment.

Functions

EDMA3_RM_Result EDMA3_RM_create (unsigned int phyCtrllerInstId, const EDMA3_RM_GblConfigParams *gblCfgParams, const void *miscParam)
 Create EDMA3 Resource Manager Object.
EDMA3_RM_Result EDMA3_RM_delete (unsigned int phyCtrllerInstId, const void *param)
 Delete EDMA3 Resource Manager Object.
EDMA3_RM_Handle EDMA3_RM_open (unsigned int phyCtrllerInstId, const EDMA3_RM_Param *initParam, EDMA3_RM_Result *errorCode)
 Open EDMA3 Resource Manager Instance.
EDMA3_RM_Result EDMA3_RM_close (EDMA3_RM_Handle hEdmaResMgr, const void *param)
 Close EDMA3 Resource Manager Instance.

Detailed Description

Top-level Encapsulation of all documentation for EDMA3 Resource Manager Layer

Typedef Documentation

EDMA3 Event Queue assignment.

There can be 8 Event Queues. Either of them can be assigned to a DMA/QDMA channel using this.

EDMA3 Region Id.

Use this to assign channels/PaRAM sets/TCCs to a particular Region.


Function Documentation

EDMA3_RM_Result EDMA3_RM_close ( EDMA3_RM_Handle  hEdmaResMgr,
const void *  param 
)

Close EDMA3 Resource Manager Instance.

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

Parameters:
hEdmaResMgr [IN] Handle to the previously opened Resource Manager Instance.
param [IN] For possible future use.
Returns:
EDMA3_RM_SOK or EDMA3_RM Error Code
Note:
This function disables the global interrupts (by calling API edma3OsProtectEntry with protection level EDMA3_OS_PROTECT_INTERRUPT) while modifying the global RM data structures, to make it re-entrant.

If this is the Master Instance, reset the static variable 'masterExists[]'.

References EDMA3_RM_Instance::avlblDmaChannels, EDMA3_RM_Instance::avlblPaRAMSets, EDMA3_RM_Instance::avlblQdmaChannels, EDMA3_RM_Instance::avlblTccs, EDMA3_RM_CLOSED, EDMA3_RM_E_INVALID_PARAM, EDMA3_RM_E_OBJ_NOT_OPENED, EDMA3_RM_OPENED, EDMA3_RM_Obj::gblCfgParams, EDMA3_RM_Instance::initParam, EDMA3_RM_Param::isMaster, EDMA3_RM_GblConfigParams::numDmaChannels, EDMA3_RM_Obj::numOpens, EDMA3_RM_GblConfigParams::numPaRAMSets, EDMA3_RM_GblConfigParams::numTccs, EDMA3_RM_Obj::phyCtrllerInstId, EDMA3_RM_Instance::pResMgrObjHandle, EDMA3_RM_Instance::shadowRegs, and EDMA3_RM_Obj::state.

EDMA3_RM_Result EDMA3_RM_create ( unsigned int  phyCtrllerInstId,
const EDMA3_RM_GblConfigParams gblCfgParams,
const void *  miscParam 
)

Create EDMA3 Resource Manager Object.

This API is used to create the EDMA3 Resource Manager 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, Resource Manager Object's state changes to EDMA3_RM_CREATED from EDMA3_RM_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_RM_MiscParam'. For default options, user can pass NULL in this argument.
Returns:
EDMA3_RM_SOK or EDMA3_RM Error Code

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

We are NOT checking 'gblCfgParams' for NULL. If user has passed NULL, default config info will be taken from config file. 'param' is also not being checked because it could be NULL also.

Check whether user has passed the Global Config Info. If yes, copy it to the driver data structures. Else, use the info from the config file edma3Cfg.c

Check whether DMA channel to PaRAM Set mapping exists or not. If it does not exist, set the mapping array as 1-to-1 mapped.

Update the actual number of PaRAM sets.

Check the misc configuration options structure. Check whether the global registers' initialization is required or not. It is required ONLY if RM is running on the Master Processor.

References EDMA3_RM_GblConfigParams::dmaChannelPaRAMMap, EDMA3_RM_GblConfigParams::dmaChPaRAMMapExists, EDMA3_RM_CREATED, EDMA3_RM_DELETED, EDMA3_RM_E_INVALID_PARAM, EDMA3_RM_E_OBJ_NOT_DELETED, EDMA3_RM_Obj::gblCfgParams, EDMA3_RM_MiscParam::isSlave, EDMA3_RM_GblConfigParams::numDmaChannels, EDMA3_RM_Obj::numOpens, EDMA3_RM_GblConfigParams::numPaRAMSets, EDMA3_RM_GblConfigParams::numQdmaChannels, EDMA3_RM_ChBoundResources::paRAMId, EDMA3_RM_Obj::phyCtrllerInstId, EDMA3_RM_Obj::state, and EDMA3_RM_ChBoundResources::tcc.

EDMA3_RM_Result EDMA3_RM_delete ( unsigned int  phyCtrllerInstId,
const void *  param 
)

Delete EDMA3 Resource Manager Object.

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

After successful completion of this API, Resource Manager Object's state changes to EDMA3_RM_DELETED.

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

If number of RM Instances is 0, then state should be EDMA3_RM_CLOSED OR EDMA3_RM_CREATED.

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

Change state to EDMA3_RM_DELETED

References EDMA3_RM_CLOSED, EDMA3_RM_CREATED, EDMA3_RM_DELETED, EDMA3_RM_E_INVALID_PARAM, EDMA3_RM_E_INVALID_STATE, EDMA3_RM_E_OBJ_NOT_CLOSED, and EDMA3_RM_Obj::state.

EDMA3_RM_Handle EDMA3_RM_open ( unsigned int  phyCtrllerInstId,
const EDMA3_RM_Param initParam,
EDMA3_RM_Result *  errorCode 
)

Open EDMA3 Resource Manager Instance.

This API is used to open an EDMA3 Resource Manager Instance. It could be called multiple times, for each possible EDMA3 shadow region. Maximum EDMA3_MAX_RM_INSTANCES instances are allowed for each EDMA3 hardware instance.

Also, only ONE Master Resource Manager 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 (initParam->rmInstInitConfig) as a part of the 'initParam' 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 Resource Manager 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).
initParam [IN] Used to Initialize the Resource Manager Instance (Master or Slave).
errorCode [OUT] Error code while opening RM instance.
Returns:
Handle to the opened Resource Manager instance Or NULL in case of error.
Note:
This function disables the global interrupts (by calling API edma3OsProtectEntry with protection level EDMA3_OS_PROTECT_INTERRUPT) while modifying the global RM data structures, to make it re-entrant.
This API is used to open an EDMA3 Resource Manager Instance. It could be called multiple times, for each possible EDMA3 shadow region. Maximum EDMA3_MAX_RM_INSTANCES instances are allowed for each EDMA3 hardware instance.

Also, only ONE Master Resource Manager 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 (initParam->rmInstInitConfig) as a part of the 'initParam' 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).
initParam [IN] Used to Initialize the Resource Manager Instance (Master or Slave).
errorCode [OUT] Error code while opening RM instance.
Returns:
Handle to the opened Resource Manager instance Or NULL in case of error.
Note:
This function disables the global interrupts (by calling API edma3OsProtectEntry with protection level EDMA3_OS_PROTECT_INTERRUPT) while modifying the global RM data structures, to make it re-entrant.

Check state of RM Object. If no RM instance is opened and this is the first one, then state should be created/closed.

If num of instances opened is more than 0 and less than max allowed, then state should be opened.

Check whether user has passed information about resources owned and reserved by this instance. This is region specific information. If he has not passed, dafault static config info will be taken from the config file edma3Cfg.c, according to the regionId specified.

resMgrIdx specifies the RM instance number created just now. Use it to populate the userInitConfig [].

By default, PaRAM Sets allocated using this RM Instance will get cleared during their allocation. User can stop their clearing by calling specific IOCTL command.

By default, during the EDMA3_RM_allocLogicalChannel (), global EDMA3 registers (DCHMAP/QCHMAP) and the allocated PaRAM Set will be programmed accordingly, for users using this RM Instance. User can stop their pre-programming by calling EDMA3_RM_IOCTL_SET_GBL_REG_MODIFY_OPTION IOCTL command.

References EDMA3_RM_Instance::avlblDmaChannels, EDMA3_RM_Instance::avlblPaRAMSets, EDMA3_RM_Instance::avlblQdmaChannels, EDMA3_RM_Instance::avlblTccs, EDMA3_RM_GblConfigParams::dmaChannelPaRAMMap, EDMA3_RM_GblConfigParams::dmaChPaRAMMapExists, EDMA3_RM_CH_NO_PARAM_MAP, EDMA3_RM_CLOSED, EDMA3_RM_CREATED, EDMA3_RM_E_INVALID_PARAM, EDMA3_RM_E_INVALID_STATE, EDMA3_RM_E_MAX_RM_INST_OPENED, EDMA3_RM_E_RM_MASTER_ALREADY_EXISTS, EDMA3_RM_OPENED, EDMA3_RM_Obj::gblCfgParams, EDMA3_RM_GblConfigParams::globalRegs, EDMA3_RM_Instance::initParam, EDMA3_RM_Param::isMaster, EDMA3_RM_GblConfigParams::numDmaChannels, EDMA3_RM_Obj::numOpens, EDMA3_RM_GblConfigParams::numPaRAMSets, EDMA3_RM_GblConfigParams::numRegions, EDMA3_RM_GblConfigParams::numTccs, EDMA3_RM_InstanceInitConfig::ownDmaChannels, EDMA3_RM_InstanceInitConfig::ownPaRAMSets, EDMA3_RM_InstanceInitConfig::ownQdmaChannels, EDMA3_RM_InstanceInitConfig::ownTccs, EDMA3_RM_Instance::paramInitRequired, EDMA3_RM_Instance::pResMgrObjHandle, EDMA3_RM_Param::regionId, EDMA3_RM_Param::regionInitEnable, EDMA3_RM_Instance::regModificationRequired, EDMA3_RM_InstanceInitConfig::resvdPaRAMSets, EDMA3_RM_Param::rmInstInitConfig, EDMA3_RM_Param::rmSemHandle, EDMA3_RM_Instance::shadowRegs, and EDMA3_RM_Obj::state.


Generated on Tue Jul 7 19:26:48 2009 for EDMA3 Resource Manager by  doxygen 1.5.9