qmss_drv.c File Reference

This is the Queue Manager Low Level Driver file. More...

#include <qmss_types.h>
#include <string.h>
#include <ti/drv/qmss/qmss_drv.h>
#include <ti/drv/qmss/include/qmss_pvt.h>
#include <ti/drv/qmss/include/qmss_intd.h>
#include <qmss_osal.h>
#include <ti/drv/rm/rm_public_lld.h>

Functions

static Qmss_QueueHnd Qmss_internalQueueOpen (Qmss_QueueType queType, int queNum, uint8_t *isAllocated)
Qmss_Result Qmss_init (Qmss_InitCfg *initCfg, Qmss_GlobalConfigParams *qmssGblCfgParams)
Qmss_Result Qmss_startCfg (Qmss_StartCfg *startCfg)
Qmss_Result Qmss_start (void)
Qmss_Result Qmss_getMemoryRegionCfg (Qmss_MemRegCfg *memRegInfo)
Qmss_Result Qmss_insertMemoryRegion (Qmss_MemRegInfo *memRegCfg)
Qmss_QueueHnd Qmss_initDescriptor (Qmss_DescCfg *descCfg, uint32_t *numAllocated)
Qmss_QueueHnd Qmss_queueOpen (Qmss_QueueType queType, int32_t queNum, uint8_t *isAllocated)
Qmss_QueueHnd Qmss_queueOpenInRange (uint32_t startQueNum, uint32_t endQueNum, uint8_t *isAllocated)
Qmss_Result Qmss_queueClose (Qmss_QueueHnd hnd)
uint32_t Qmss_getQueueThreshold (Qmss_QueueHnd hnd)
Qmss_Result Qmss_setQueueThreshold (Qmss_QueueHnd hnd, uint16_t hilo, uint8_t threshold)
uint32_t Qmss_getStarvationCount (Qmss_QueueHnd hnd)
uint16_t Qmss_getQueueThresholdStatus (Qmss_QueueHnd hnd)
Qmss_Queue Qmss_getQueueNumber (Qmss_QueueHnd hnd)
Qmss_QueueHnd Qmss_getQueueHandle (Qmss_Queue queue)
Qmss_Result Qmss_downloadFirmware (Qmss_PdspId pdspId, void *image, uint32_t size)
Qmss_Result Qmss_setEoiVector (Qmss_IntdInterruptType type, uint8_t accumCh)
Qmss_Result Qmss_ackInterrupt (uint8_t interruptNum, uint8_t value)
uint32_t Qmss_getVersion (void)
const char * Qmss_getVersionStr (void)
int32_t Qmss_getMemRegQueueHandle (uint32_t memRegion)
uint32_t Qmss_getMemRegDescSize (uint32_t memRegion)

Variables

const char qmssLldVersionStr [] = QMSS_LLD_VERSION_STR ":" __DATE__ ":" __TIME__
 Global Variable which describes the QMSS LLD Version Information.

Detailed Description

This is the Queue Manager Low Level Driver file.

============================================================================
(C) Copyright 2009-2012, Texas Instruments, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Function Documentation

uint32_t Qmss_getMemRegDescSize ( uint32_t  memRegion  ) 

Description
The function returns size of the descriptors in the specified memory region.

This is for *internal* LLD usage.

Parameters:
[in] memRegion Memory region number.
Return values:
Descriptor size
int32_t Qmss_getMemRegQueueHandle ( uint32_t  memRegion  ) 

Description
The function return the source queue handle on which the descriptors configured for the specified memory region are stored.

This is for *internal* LLD usage.

Parameters:
[in] memRegion Memory region number
Return values:
Success - Queue Handle
Failure - QMSS_NOT_INITIALIZED
static Qmss_QueueHnd Qmss_internalQueueOpen ( Qmss_QueueType  queType,
int  queNum,
uint8_t *  isAllocated 
) [static]

Description
Internal queue open function; is called to allocate a queue when critical section is provided by the caller.

A queue can be opened in two ways: 1) If "queNum" is set to QMSS_PARAM_NOT_SPECIFIED, then a new available queue of type "queType" is allocated. 2) If "queNum" is a valid queue number i.e., >= 0, then a queue is allocated if free else a handle to a previously opened queue is returned. In this case "queType" parameter is not used.

Parameters:
[in] queType Specifies the type of queue that should be opened.
[in] queNum Specifies the queue number that should be opened.
[out] isAllocated Indicates whether the requested queue is a new queue allocation(1). or was already allocated. If the queue was previously allocated this parameter returns the reference count.

*

Precondition:
Appropriate Critical section protection should be provided by caller.
Return values:
Success - Queue Handle. Used as an input parameter for operation on this queue.
Failure - QMSS_RESOURCE_USE_DENIED
Failure - <0

Copyright 2012, Texas Instruments Incorporated