Data Structures | Defines | Typedefs | Enumerations | Functions
srio_drv.h File Reference

Header file for the SRIO Driver. The file exposes the data structures and exported API which are available for use by the driver users. More...

#include <ti/drv/cppi/cppi_drv.h>
#include <ti/drv/cppi/cppi_desc.h>
#include <ti/csl/csl_srio.h>
#include <ti/drv/srio/sriover.h>

Data Structures

struct  Srio_DrvManagedRxCfg
 The structure describes the SRIO Driver Managed Receive Configuration. More...
struct  Srio_DrvManagedTxCfg
 The structure describes the SRIO Driver Managed Transmit Configuration. More...
struct  Srio_DrvManagedCfg
 The structure describes the SRIO Driver Managed Configuration. More...
struct  Srio_AppManagedCfg
 The structure describes the application managed configuration. More...
union  Srio_DrvConfigType
 Describes driver configuration. More...
struct  Srio_DrvConfig
 The structure describes the SRIO Driver Configuration. More...
struct  Srio_Type11BindAddrInfo
 SRIO Socket Type11 Binding Information. More...
struct  Srio_Type11AddrInfo
 SRIO Socket Type11 Address Information. More...
struct  Srio_Type9AddrInfo
 SRIO Socket Type9 Information. More...
struct  Srio_DioBindAddrInfo
 SRIO Socket DIO Binding Information. More...
struct  Srio_DioAddrInfo
 SRIO Socket DIO Information. More...
union  Srio_SockBindAddrInfo
 SRIO Socket Bind Information. More...
union  Srio_SockAddrInfo
 SRIO Socket Address Information. More...

Defines

#define DEFAULT_SRIO_MAX_PENDING_PACKETS   5
 This defines the maximum depth of the SRIO socket receive queues. This is the MAX number of packets which can be enqueued in the SRIO socket receive queue before packets get dropped.
#define NUM_SRIO_TYPE9_TYPE11_SOCKETS   64
 This is the maximum number of Type9 and Type11 sockets that can be created. This is limited by the hardware and since Type9 and Type11 share the same QID_MAP register both of them are limited to this.
#define NUM_DIO_SOCKETS   8
 This is the maximum number of DIO sockets that can be created. This limit is specified by the number of LSU blocks.
#define SRIO_SET_DBELL_INFO(DBELL_REG, DBELL_BIT)
 This is a macro provided for the application and should be used if a DOORBELL is to be transmitted.
#define SRIO_GET_DBELL_REG(DBELL_INFO)   CSL_FEXTR(DBELL_INFO, 31, 16)
 This is a macro provided for the application and should be used to get the doorbell register information once data is received on the DIO socket.
#define SRIO_GET_DBELL_BIT(DBELL_INFO)   CSL_FEXTR(DBELL_INFO, 15, 0)
 This is a macro provided for the application and should be used to get the doorbell bit information once data is received on the DIO socket.
#define SRIO_TYPE11_HW_ASSIGNED_LETTER_VALUE   4
 Specifies to use hardware assigned Letter to which the message will be send. The hardware will check for an unused context starting with letter = 0 (A), and incrementing to letter = 3 (D). The first unused context with that letter will be used. If there are no context available with any letters then the packet is stopped and re-arbitrated in the TXU until one does get available.
#define SRIO_TYPE11_RX_ACCEPT_ALL_MBOX_VALUE   0xFFFF
 This value can be used to accept all mailbox values on receive side. Setting a mailbox number to this value will set MBX_MASK to "0x000000" in RIO_RXU_MAPxx_L register.

Typedefs

typedef void * Srio_SockHandle
 This is the handle which is used for sending and receiving data.
typedef void * Srio_DrvHandle
 This is the handle which is used accessing the SRIO driver.
typedef void * Srio_DrvBuffer
 This is the handle which encapsulates the SRIO driver buffer information.
typedef struct Srio_DrvManagedRxCfg Srio_DrvManagedRxCfg
 The structure describes the SRIO Driver Managed Receive Configuration.
typedef struct Srio_DrvManagedTxCfg Srio_DrvManagedTxCfg
 The structure describes the SRIO Driver Managed Transmit Configuration.
typedef struct Srio_DrvManagedCfg Srio_DrvManagedCfg
 The structure describes the SRIO Driver Managed Configuration.
typedef struct Srio_AppManagedCfg Srio_AppManagedCfg
 The structure describes the application managed configuration.
typedef union Srio_DrvConfigType Srio_DrvConfigType
 Describes driver configuration.
typedef struct Srio_DrvConfig Srio_DrvConfig
 The structure describes the SRIO Driver Configuration.
typedef enum Srio_SocketType Srio_SocketType
 Enumeration Type which describes the socket.
typedef struct
Srio_Type11BindAddrInfo 
Srio_Type11BindAddrInfo
 SRIO Socket Type11 Binding Information.
typedef struct Srio_Type11AddrInfo Srio_Type11AddrInfo
 SRIO Socket Type11 Address Information.
typedef struct Srio_Type9AddrInfo Srio_Type9AddrInfo
 SRIO Socket Type9 Information.
typedef Srio_Type9AddrInfo Srio_Type9BindAddrInfo
 SRIO Socket Type9 Binding Information.
typedef struct Srio_DioBindAddrInfo Srio_DioBindAddrInfo
 SRIO Socket DIO Binding Information.
typedef struct Srio_DioAddrInfo Srio_DioAddrInfo
 SRIO Socket DIO Information.
typedef union Srio_SockBindAddrInfo Srio_SockBindAddrInfo
 SRIO Socket Bind Information.
typedef union Srio_SockAddrInfo Srio_SockAddrInfo
 SRIO Socket Address Information.
typedef enum Srio_Opt Srio_Opt
 SRIO Driver Option Commands.

Enumerations

enum  Srio_PktDma_Prio
 SRIO priority level set in the TCHAN_SCHED_CFG_REGn registers. More...
enum  Srio_SocketType {
  Srio_SocketType_TYPE9 = 0x1, Srio_SocketType_RAW_TYPE9 = 0x2, Srio_SocketType_TYPE11 = 0x3, Srio_SocketType_RAW_TYPE11 = 0x4,
  Srio_SocketType_DIO = 0x5
}
 Enumeration Type which describes the socket. More...
enum  Srio_Opt { Srio_Opt_PENDING_PKT_COUNT = 0x1, Srio_Opt_DIO_SOCK_COMP_CODE = 0x2, Srio_Opt_REGISTER_DOORBELL = 0x3, Srio_Opt_DIO_READ_SOCK_COMP_CODE = 0x4 }
 SRIO Driver Option Commands. More...
enum  Srio_Ftype
 RIO Format Type. More...
enum  Srio_Ttype_Request
 RIO Transaction Type for Type2 Packet Format. More...
enum  Srio_Ttype_Write
 RIO Transaction Type for Type5 Packet Format. More...
enum  Srio_Ttype_Swrite
 RIO Transaction Type for Type6 Packet Format. More...
enum  Srio_Ttype_Congestion
 RIO Transaction Type for Type7 Packet Format. More...
enum  Srio_Ttype_Maintenance
 RIO Transaction Type for Type8 Packet Format. More...
enum  Srio_Ttype_Data_Streaming
 RIO Transaction Type for Type9 Packet Format. More...
enum  Srio_Ttype_Doorbell
 RIO Transaction Type for Type10 Packet Format. More...
enum  Srio_Ttype_Message
 RIO Transaction Type for Type11 Packet Format. More...
enum  Srio_Ttype_Response
 RIO Transaction Type for Type13 Packet Format. More...

Functions

int32_t Srio_init (void)
Srio_DrvHandle Srio_start (Srio_DrvConfig *ptr_cfg)
Srio_SockHandle Srio_sockOpen (Srio_DrvHandle hSrio, Srio_SocketType type, uint16_t isBlocking)
int32_t Srio_sockBind (Srio_SockHandle srioSock, Srio_SockBindAddrInfo *ptr_addrInfo)
int32_t Srio_sockBind_TYPE11 (Srio_SockHandle srioSock, Srio_SockBindAddrInfo *ptr_addrInfo)
int32_t Srio_sockBind_TYPE9 (Srio_SockHandle srioSock, Srio_SockBindAddrInfo *ptr_addrInfo)
int32_t Srio_sockBind_DIO (Srio_SockHandle srioSock, Srio_SockBindAddrInfo *ptr_addrInfo)
int32_t Srio_sockSend (Srio_SockHandle srioSock, Srio_DrvBuffer hBuffer, uint32_t size, Srio_SockAddrInfo *to)
int32_t Srio_sockSend_TYPE11 (Srio_SockHandle srioSock, Srio_DrvBuffer hBuffer, uint32_t size, Srio_SockAddrInfo *to)
int32_t Srio_sockSend_TYPE9 (Srio_SockHandle srioSock, Srio_DrvBuffer hBuffer, uint32_t size, Srio_SockAddrInfo *to)
int32_t Srio_sockSend_DIO (Srio_SockHandle srioSock, Srio_DrvBuffer hBuffer, uint32_t size, Srio_SockAddrInfo *to)
int32_t Srio_sockRecv (Srio_SockHandle srioSock, Srio_DrvBuffer *hDrvBuffer, Srio_SockAddrInfo *from)
void Srio_freeRxDrvBuffer (Srio_SockHandle srioSock, Srio_DrvBuffer hDrvBuffer)
int32_t Srio_setSockOpt (Srio_SockHandle srioSock, Srio_Opt option, void *optval, int32_t optlen)
int32_t Srio_getSockOpt (Srio_SockHandle srioSock, Srio_Opt option, void *optval, int32_t optlen)
int32_t Srio_sockClose (Srio_SockHandle srioSock)
int32_t Srio_sockClose_TYPE11 (Srio_SockHandle srioSock)
int32_t Srio_sockClose_TYPE9 (Srio_SockHandle srioSock)
int32_t Srio_sockClose_DIO (Srio_SockHandle srioSock)
Srio_DrvBuffer Srio_allocTransmitBuffer (Srio_DrvHandle hSrioDrv, uint8_t **ptrData, uint32_t *bufferLen)
void Srio_freeTransmitBuffer (Srio_DrvHandle hSrioDrv, Srio_DrvBuffer hDrvBuffer)
void Srio_dioCompletionIsr (Srio_DrvHandle hSrioDrv, uint8_t intDstDoorbell[])
void Srio_dioTxCompletionIsr (Srio_DrvHandle hSrioDrv, CSL_SrioHandle hSrioCSL)
void Srio_rxCompletionIsr (Srio_DrvHandle hSrioDrv)
uint32_t Srio_getVersion (void)
const char * Srio_getVersionStr (void)

Detailed Description

Header file for the SRIO Driver. The file exposes the data structures and exported API which are available for use by the driver users.

NOTE: (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.


Copyright 2014, Texas Instruments Incorporated