/******************************************************************************* **+--------------------------------------------------------------------------+** **| **** |** **| **** |** **| ******o*** |** **| ********_///_**** |** **| ***** /_//_/ **** |** **| ** ** (__/ **** |** **| ********* |** **| **** |** **| *** |** **| |** **| Copyright (c) 1998-2006 Texas Instruments Incorporated |** **| ALL RIGHTS RESERVED |** **| |** **+--------------------------------------------------------------------------+** *******************************************************************************/ /** \file pal_cppi4.h \brief PAL CPPI4 header file This file is the CPPI4 PAL header file to be included by any drivers which use CPPI4. This file is compliant to the PSP Framework 1.0 definitions and prototypes. \note When including this file from PAL source code, CPPI4_PAL must be defined. Documentation for #defines that may be included in makefiles: CPPI4_PAL_GETSTATS - Enables statistic counters for queue manager activity, tracking the number of pushes and pops off of each queue. Primarily intended for debug use. CPPI4_PAL_DEBUG - Enables debug messages currently implemented via direct call to printf. CPPI4_PAL_MIPS_OPTIMIZED - Uses macros to perform address conversions, rather than PAL_osMemXXX library calls. Also enables MIPS assembly macros for cache functions. This is required if CPPI4_PAL_USE_ASSEMBLY is defined. CPPI4_PAL_USE_ASSEMBLY - Enables the use of assembly languange versions of cache functions. Generally recommended for performance, but the caller must recognize that the 'size' parameter is ignored, and therefore if you need to operate on more than one cache line, you must call the macro multiple times, incrementing the 'addr' parameter as you go. CPPI4_CACHE_WRITEBACK_MODE - Enables the use of the WRITEBACK macros. If not defined, WRITEBACK macros will have no effect. Required if CPU cache archtecture is write back (true for MIPS 4kec). @author Greg Guyotte */ #ifndef __PAL_CPPI4_H__ #define __PAL_CPPI4_H__ #include "pal.h" #include "pal_cppi4Cfg.h" /* PAL Cfg file for reference to HW cfg macros */ #include "cslr_cppi4.h" /* CSL Header file */ /** * \defgroup CPPI4_PAL_Interface CPPI4 PAL Interface * * CPPI4 PAL Layer Interface */ /*@{*/ /** * \brief PAL CPPI4 Error Codes * * Refer to PAL Error codes description. * * \note Need to define a unique device specific error code identifier. (as * defined in pal_defs.h) */ #define CPPI4_DEVICE_CODE 0xFF #define CPPI4_ERR_DEV_ALREADY_INSTANTIATED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 1) #define CPPI4_ERR_DEV_NOT_INSTANTIATED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 2) #define CPPI4_ERR_DEV_NOT_OPEN PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 3) #define CPPI4_INVALID_PARAM PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 4) #define CPPI4_ERR_CH_INVALID PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 5) #define CPPI4_ERR_DEV_ALREADY_OPEN PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 6) #define CPPI4_ERR_DEV_ALREADY_CLOSED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 7) #define CPPI4_ERR_RX_BUFFER_FREE_FAIL PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 8) #define CPPI4_ERR_RX_BUFFER_ALLOC_FAIL PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 9) #define CPPI4_ERR_INVALID_DESC_QUEUE PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 10) #define CPPI4_ERR_GENERAL PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 11) #define CPPI4_ERR_TX_CH_ALREADY_OPENED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 12) #define CPPI4_ERR_RX_CH_ALREADY_OPENED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 13) #define CPPI4_ERR_TX_CH_ALREADY_CLOSED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 14) #define CPPI4_ERR_RX_CH_ALREADY_CLOSED PAL_ERROR(PAL_MAJOR_ERROR, PAL_ERROR_SRC_PAL, CPPI4_DEVICE_CODE, 15) /** * \brief CPPI4 PAL Ioctl's * * \note Not currently using a standard approach for Ioctl values, unlike DDC. */ #define CPPI4_PAL_IOCTL_GET_SWVER 0 #define CPPI4_PAL_IOCTL_GET_HWVER 1 /** * \brief Channel Config Info * * Contains data common to both TX and RX channels. Used to pass channel * config info from driver to PAL for PAL_cppi4TxChOpen and PAL_cppi4RxChOpen. * An instance of this structure is provided in both the Cppi4TxChInfo and * Cppi4RxChInfo structures. */ typedef struct { Int chNum; /**< Channel number */ Bool endian; /**< Endian mode (0 = little) */ Bool chMode; /**< 0 = Host mode, 1 = embedded mode */ } Cppi4ChInfo; /** * \brief TX Channel Information Structure * * Must be allocated and filled by the caller of PAL_cppi4TxChOpen. */ typedef struct { Cppi4ChInfo chInfo; /**< Channel config/info */ Int descCopyByteCount; /**< Number of proto-specific bytes to copy from Source to Dest descriptor (host mode only) */ Int pktType; /**< Default packet type for the channel. 0 = AAL5, 1 = PTI based NULL, 2 = ATM OAM, 3 = ATM Trans, 4 = EFM, 7 = Ethernet, 6 = generic */ Int cqIndex; /**< Completion queue for this channel. (0-7) */ } Cppi4TxChInfo; /** * \brief RX Channel Information Structure * * Must be allocated and filled by the caller of PAL_cppi4RxChOpen. */ typedef struct { /* Configuration info */ Cppi4ChInfo chInfo; /**< Channel config/info */ Int fbqIndex[4]; /**< Free Buffer List/Pool Array. Element 0 used for 1st Rx buffer, etc. */ Bool errHandling; /**< 0 = drop pkt and recycle on error, 1 = forward pkt with err flag */ Int sopOffset; /**< Num bytes to skip in SOP buffer before writing payload */ Bool fdpIndex; /**< The free descriptor pool to be used (embedded mode only) */ Int rqIndex; /**< Receive queue for this channel. */ } Cppi4RxChInfo; /** * \brief CPPI4 Init Configuration * * Configuration information provided to PAL layer during initialization. * The config info can come from various sources - static compiled in info, * boot time (ENV, Flash) info etc. */ typedef struct { Uint32 qmRegs_Addr; /**< Queue manager region address */ Uint32 dmaRegs_Addr; /**< CPPI 4.0 DMA region address */ Uint32 resetLine; /**< NWSS Reset Line Number */ } Cppi4InitConfig; /* * The CPPI4 PAL object internals are hidden from the upper layers. Hence the * internal data structure for Cppi4PALObj is in the PAL internal header and the * upper layers interpret PAL_Handle as a Ptr. All PAL files must be compiled * with the switch "CPPI4_PAL" so that the PAL can interpret a PAL_Handle as a * data structure. */ typedef void PAL_Handle; typedef void PAL_Cppi4TxChHnd; typedef void PAL_Cppi4RxChHnd; typedef Uint32 PAL_Cppi4BD; /************************ CPPI4 PAL External API Documentation ****************/ /** * \brief PAL_cppi4Init * * This function initializes the CPPI4 PAL. This is the first function to be * called by a module requiring CPPI4 support. Multiple upper layers may call * this function, although only one actual instance will be created. After the * first call, subsequent callers will simply be given the PAL Handle that was * allocated during the first call. * * The PAL handle that is returned must be used to close the PAL interface. * * This function will bring the networking subsystem, out of reset, and * initialize the queue manager hardware. * * \note The initCfg parameter values are only valid for the first caller - i.e. * the CPPI4 PAL is initialized only once, regardless of the number of calls to * this function. * * @param hnd [IN/OUT] Handle to the PAL layer. * @param initCfg [IN] Pointer to CPPI4 config structure, to be * allocated and loaded with values by the caller. * @param param [IN] Not used in this implementation. For future use. * * @return PAL_Handle * * Possible Error Codes:
* PAL_OS_ERROR_NO_RESOURCES
*/ PAL_Handle *PAL_cppi4Init (Cppi4InitConfig * initCfg, Ptr param); /** * \brief PAL_cppi4Control * * This function provides the capability for control operations to be performed * on the PAL CPPI4 module. * * The command (cmd) is used to direct the function to perform one or more of * the supported operations. The current commands supported are: * * - CPPI4_PAL_IOCTL_GET_SWVER - cmdArg is a ptr to an integer * that will be written with the s/w version id, and param is a double ptr * to a string which will point the the static version text string. * - CPPI4_PAL_IOCTL_GET_HWVER - param is a ptr to an integer that will be * written with the hardware rev. * * @param hnd [IN] Handle to the PAL Layer. * @param cmd [IN] Operation to be performed. * @param cmdArg [IN/OUT] Provides additional info for the operation. * @param param [IN/OUT] Device/Cmd specific argument. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4Control (PAL_Handle * hnd, Uint32 cmd, Ptr cmdArg, Ptr param); /** * \brief PAL_cppi4Exit * * This function must be called by every upper layer module which called * PAL_cppi4Init. During the usage cycle of the CPPI4 PAL, this is the last * function called by the upper layer module. When the last upper layer * module calls this function, it will place the networking subsystem * in reset, and cleanup all memory local to the CPPI4 PAL instance. * * @note The caller should close all active channels (via PAL_cppi4ChClose) * prior to calling PAL_cppi4Exit. * * @param hnd [IN] Handle to the PAL Layer. * @param param [IN] Not used in this implementation. For future use. * * @return PAL_SOK
* Possible Error Codes:
* CPPI_ERR_DEV_NOT_INSTANTIATED
*/ PAL_Result PAL_cppi4Exit (PAL_Handle * hnd, Ptr param); /** * \brief PAL_cppi4TxChOpen * * This function opens the specified Tx channel. The caller * is required to provide channel configuration information by initializing * a Cppi4TxChInfo structure. A pointer to that structure must be passed via * the txChInfo parameter. * * * @param hnd [IN] Handle to the PAL Layer. * @param info [IN] Pointer to TX channel information structure. * @param chOpenArgs [IN] For future use. * * @return PAL_Cppi4TxChHnd *
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_OPENED
* CPPI4_ERR_CH_INVALID
* Any error code from PAL_osMemAlloc
*/ PAL_Cppi4TxChHnd *PAL_cppi4TxChOpen (PAL_Handle * hnd, Cppi4TxChInfo * info, Ptr chOpenArgs); /** * \brief PAL_cppi4EnableTxChannel * * This function enables specified Tx channel. The caller * is required to provide channel handled returned to it via * call to the PAL_cppi4TxChOpen fuction earlier * * After the successful completion of this function, the Tx DMA channel will * be active and ready for data transmission. * * @param hnd [IN] Handle to the PAL Layer. * @param info [IN] Pointer to TX channel information structure. * @param chOpenArgs [IN] For future use. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_OPENED
* CPPI4_ERR_CH_INVALID
* Any error code from PAL_osMemAlloc
*/ PAL_Result PAL_cppi4EnableTxChannel (PAL_Cppi4TxChHnd * hnd, Ptr chCloseArgs); /** * \brief PAL_cppi4RxChOpen * * This function configures and opens the specified Rx channel. The caller * is required to provide channel configuration information by initializing * a Cppi4RxChInfo structure. A pointer to that structure must be passed via * the rxChInfo parameter. * * * @param hnd [IN] Handle to the PAL Layer. * @param info [IN] Pointer to RX channel information structure. * @param chOpenArgs [IN] For future use. * * @return PAL_Cppi4RxChHnd *
* Possible Error Codes:
* CPPI4_ERR_RX_CH_ALREADY_OPENED
* CPPI4_ERR_CH_INVALID
* Any error code from PAL_osMemAlloc
*/ PAL_Cppi4RxChHnd *PAL_cppi4RxChOpen (PAL_Handle * hnd, Cppi4RxChInfo * info, Ptr chOpenArgs); /** * \brief PAL_cppi4EnableRxChannel * * This function enables specified Rx channel. The caller * is required to provide channel handled returned to it via * call to the PAL_cppi4RxChOpen fuction earlier * * After the successful completion of this function, the Rx DMA channel will * be active and ready for data transmission. * * @param hnd [IN] Handle to the PAL Layer. * @param info [IN] Pointer to TX channel information structure. * @param chOpenArgs [IN] For future use. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_OPENED
* CPPI4_ERR_CH_INVALID
* Any error code from PAL_osMemAlloc
*/ PAL_Result PAL_cppi4EnableRxChannel (PAL_Cppi4RxChHnd * hnd, Ptr chCloseArgs); /** * \brief PAL_cppi4TxChClose * * This function closes the given Tx channel. * * \note Interrupts must not be disabled when calling this function. This is * because a successful channel close event is acknowledged via the normal * interrupt processing routines. * * This function just sets up for the closure of the channel and returns. The * caller must detect the channel close event to assume that the channel is * closed. * * @param hnd [IN] Handle to the CPPI 4.0 TX or RX Channel. * @param chCloseArgs [IN] For future use. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_CLOSED
* CPPI4_ERR_RX_CH_ALREADY_CLOSED
* CPPI4_ERR_CH_INVALID
*/ PAL_Result PAL_cppi4TxChClose (PAL_Cppi4TxChHnd * hnd, Ptr chCloseArgs); /** * \brief PAL_cppi4RxChClose * * This function closes the given Rx channel. * * \note Interrupts must not be disabled when calling this function. This is * because a successful channel close event is acknowledged via the normal * interrupt processing routines. * * This function just sets up for the closure of the channel and returns. The * caller must detect the channel close event to assume that the channel is * closed. * * @param hnd [IN] Handle to the CPPI 4.0 TX or RX Channel. * @param chCloseArgs [IN] For future use. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_CLOSED
* CPPI4_ERR_RX_CH_ALREADY_CLOSED
* CPPI4_ERR_CH_INVALID
*/ PAL_Result PAL_cppi4RxChClose (PAL_Cppi4RxChHnd * hnd, Ptr chCloseArgs); /** * \brief PAL_cppi4DisableTxChannel * * This function disables specified Tx channel. The caller * is required to provide channel handled returned to it via * call to the PAL_cppi4TxChOpen fuction earlier * * After the successful completion of this function, the Tx DMA channel will * be deactived. * * @param hnd [IN] Handle to the PAL Layer. * @param info [IN] Pointer to TX channel information structure. * @param chOpenArgs [IN] For future use. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_OPENED
* CPPI4_ERR_CH_INVALID
* Any error code from PAL_osMemAlloc
*/ PAL_Result PAL_cppi4DisableTxChannel (PAL_Cppi4TxChHnd * hnd, Ptr chCloseArgs); /** * \brief PAL_cppi4DisableRxChannel * * This function disables specified Rx channel. The caller * is required to provide channel handled returned to it via * call to the PAL_cppi4RxChOpen fuction earlier * * After the successful completion of this function, the Rx DMA channel * will be deactivated. * * @param hnd [IN] Handle to the PAL Layer. * @param info [IN] Pointer to TX channel information structure. * @param chOpenArgs [IN] Set to 1 to avoid the teardown of the channel. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_TX_CH_ALREADY_OPENED
* CPPI4_ERR_CH_INVALID
* Any error code from PAL_osMemAlloc
*/ PAL_Result PAL_cppi4DisableRxChannel (PAL_Cppi4RxChHnd * hnd, Ptr chCloseArgs); /** * \brief PAL_cppi4TxPush * * This function is called to queue a "single" buffer descriptor onto the * specific TX queue associated with the indicated channel. * * @param hnd [IN] Handle to the CPPI 4.0 TX Channel. * @param bdAddr [IN] Buffer descriptor physical address. * @param queuePriority [IN] Priority of the queue with in the channel. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4TxPush (PAL_Cppi4TxChHnd * hnd, PAL_Cppi4BD * bdAddr, Uint32 queuePriority, Ptr param); /** * \brief PAL_cppi4TxDonePop * * This function is called to get a buffer descriptor "list" for TX interrupt * processing. These BD(s) refer to the data has been already read by the * DMA. * * If there are no outstanding packets available in the tx complete queue * associated with the specified TX channel, a NULL pointer is returned other- * wise linked list of the TX BD(s) is returned. * * @param hnd [IN] Handle to the CPPI 4.0 TX Channel. * @param ptr [IN] Future usage. * * @return Buffer descriptor virtual address.
*/ PAL_Cppi4BD *PAL_cppi4TxDonePop (PAL_Cppi4TxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4RxPop * * This function is called to get a buffer descriptor "list" for RX interrupt * processing. These BD(s) contain the data that has been written by the DMA. * * If there are no outstanding RX packets available in the queue associated * with the specified RX channel, a NULL pointer is returned otherwise a linked * list of the RX BD(s) is returned. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param ptr [IN] Future usage. * * @return Buffer descriptor physical address.
*/ PAL_Cppi4BD *PAL_cppi4RxPop (PAL_Cppi4RxChHnd * hnd, Uint32 queuePriority, Ptr param); /** * \brief PAL_cppi4RxFreeBDPush * * This function is called to queue a buffer descriptor onto a RX free hardware * queue. The descriptor will be added to a list of free descriptors for use * by the DMA hardware during packet reception. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param bdAddr [IN] Buffer descriptor physical address. * @param ptr [IN] Future usage. * * @return PAL_SOK
* Possible Error Codes:
* CPPI4_ERR_INVALID_DESC_QUEUE
*/ PAL_Result PAL_cppi4RxFreeBDPush (PAL_Cppi4RxChHnd * hnd, PAL_Cppi4BD * bdAddr, Ptr param); /** * \brief PAL_cppi4TxEOI * * This function writes the Queue manager TX EOI register with the given queue * number. This reenables the TX interrupt. It must only be written when all * descriptors have been processed from the list that was obtained in the call * to PAL_cppi4TxPop. * * It is recommended that the Tx interrupt routine indicate to its caller when * the end of the list has been reached. If the end of the list has been * reached, then you must call this function. Otherwise, if the interrupt * routine exited early (perhaps due to serviceMax), then the upper layer * software must implement a method to insure that at some future time, the * remainder of the Tx descriptor list is processed. You may choose to do * this by manually retriggering the interrupt. * * @param hnd [IN] Handle to the CPPI 4.0 TX Channel. * @param ptr [IN] Future usage. * * @return void */ void PAL_cppi4TxEOI (PAL_Cppi4TxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4RxEOI * * This function writes the Queue manager RX EOI register with the given queue * number. This reenables the RX interrupt. It must only be written when all * descriptors have been processed from the list that was obtained in the call * to PAL_cppi4RxPop. * * It is recommended that the Rx interrupt routine indicate to its caller when * the end of the list has been reached. If the end of the list has been * reached, then you must call this function. Otherwise, if the interrupt * routine exited early (perhaps due to serviceMax), then the upper layer * software must implement a method to insure that at some future time, the * remainder of the Rx descriptor list is processed. You may choose to do * this by manually retriggering the interrupt. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param ptr [IN] Future usage. * * @return void */ void PAL_cppi4RxEOI (PAL_Cppi4RxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4TxFlush * * This function reads one descriptor from a Tx push queue. It is only * used during TX teardown, in order to recycle descriptors from a send queue * which has been disabled. * * @param hnd [IN] Handle to the CPPI 4.0 TX Channel. * @param queuePriority [IN] Priority of the queue for the channel. * @param ptr [IN] Future usage. * * @return Buffer descriptor physical address.
*/ PAL_Cppi4BD *PAL_cppi4TxFlush (PAL_Cppi4TxChHnd * hnd, Uint32 queuePriority, Ptr param); /** * \brief PAL_cppi4RxFreeBDFlush * * This function reads one descriptor from a Rx push queue. It is only * used during RX teardown, in order to recycle descriptors from a Rx free * queue which is no longer used by any active DMA channels. * * It is only used during RX teardown, in order to gather or to reclaim the * free buffer descriptors which have been provided to receive data but the * DMA has not used them so far. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param ptr [IN] Future usage. * * @return Buffer descriptor virtual address.
*/ PAL_Cppi4BD *PAL_cppi4RxFreeBDFlush (PAL_Cppi4RxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4EnableTxIntr * * This function is called to enable the Tx completion queue interrupt for a * any of the four tx competion queue. * * @param hnd [IN] Handle to the CPPI 4.0 TX Channel. * @param param [IN] Future usage. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4EnableTxIntr (PAL_Cppi4TxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4DisableTxIntr * * This function is called to disable the Tx completion queue interrupt for * the specified TX Channel. * * @param hnd [IN] Handle to the CPPI 4.0 TX Channel. * @param param [IN] Future usage. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4DisableTxIntr (PAL_Cppi4TxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4EnableRxIntr * * This function is called to enable the Rx queue interrupt associated with * the specified RX Channel. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param param [IN] Future usage. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4EnableRxIntr (PAL_Cppi4RxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4DisableRxIntr * * This function is called to disable the Rx queue interrupt associated with * the specified RX channel. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param param [IN] Future usage. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4DisableRxIntr (PAL_Cppi4RxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4ReadRxStarveCount * * This function is called to fetch the count of the starvations of Rx free * buffer descriptor queue associated with the RX Channel, since, the last * read of this parameter. * * @param hnd [IN] Handle to the CPPI 4.0 RX Channel. * @param value [IN/OUT] Caller provided place holder for the count. * @param param [IN] Future usage. * * @return PAL_SOK
*/ PAL_Result PAL_cppi4ReadRxStarveCount (PAL_Cppi4RxChHnd * hnd, Uint32 * value, Ptr param); /** * \brief PAL_cppi4GetRxTeardownBD * * This function is called to fetch the pre-configured teardown BD. This BD * when received on the RX queue indicates the successful * teardown of the corresponding channel. * * @param hnd [IN] Handle to the CPPI 4.0 RX or TX Channel. * @param param [IN] Future usage. * * @return PAL_Cppi4BD physical address
*/ PAL_Cppi4BD *PAL_cppi4GetRxTeardownBD (PAL_Cppi4RxChHnd * hnd, Ptr param); /** * \brief PAL_cppi4GetTxTeardownBD * * This function is called to fetch the pre-configured teardown BD. This BD * when received on the TX complete queue indicates the successful * teardown of the corresponding channel. * * @param hnd [IN] Handle to the CPPI 4.0 RX or TX Channel. * @param param [IN] Future usage. * * @return PAL_Cppi4BD physical address
*/ PAL_Cppi4BD *PAL_cppi4GetTxTeardownBD (PAL_Cppi4TxChHnd * hnd, Ptr param); /*@}*/ /** * \brief PAL_cppi4GetChannel * * This function is called to get the channel number and channel type * from the Teardown buffer descriptor returned to the Tx completion * queues or Rx queues. The user passes the virtual address of the * Teardown BD to get the channel No and Channel Type. * * @param cppi4TdBD [IN] Virtual address of Teardown BD * @param channelNo [OUT] Channel no returned. * @param channelType [OUT] Channel Type 0=Tx 1=Rx. * * @return PAL_SOK */ PAL_Result PAL_cppi4GetChannel(PAL_Cppi4BD * cppi4TdBD, Uint32 * channelNo, Uint32 * channelType); #endif /* __PAL_CPPI4_H__ */