Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
cvmx-cmd-queue.c File Reference
#include <linux/kernel.h>
#include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-config.h>
#include <asm/octeon/cvmx-fpa.h>
#include <asm/octeon/cvmx-cmd-queue.h>
#include <asm/octeon/cvmx-npei-defs.h>
#include <asm/octeon/cvmx-pexp-defs.h>
#include <asm/octeon/cvmx-pko-defs.h>

Go to the source code of this file.

Functions

cvmx_cmd_queue_result_t cvmx_cmd_queue_initialize (cvmx_cmd_queue_id_t queue_id, int max_depth, int fpa_pool, int pool_size)
 
cvmx_cmd_queue_result_t cvmx_cmd_queue_shutdown (cvmx_cmd_queue_id_t queue_id)
 
int cvmx_cmd_queue_length (cvmx_cmd_queue_id_t queue_id)
 
voidcvmx_cmd_queue_buffer (cvmx_cmd_queue_id_t queue_id)
 

Variables

__cvmx_cmd_queue_all_state_t__cvmx_cmd_queue_state_ptr
 

Function Documentation

void* cvmx_cmd_queue_buffer ( cvmx_cmd_queue_id_t  queue_id)

Return the command buffer to be written to. The purpose of this function is to allow CVMX routine access t othe low level buffer for initial hardware setup. User applications should not call this function directly.

: Command queue to query

Returns Command buffer or NULL on failure

Definition at line 299 of file cvmx-cmd-queue.c.

cvmx_cmd_queue_result_t cvmx_cmd_queue_initialize ( cvmx_cmd_queue_id_t  queue_id,
int  max_depth,
int  fpa_pool,
int  pool_size 
)

Initialize a command queue for use. The initial FPA buffer is allocated and the hardware unit is configured to point to the new command queue.

: Hardware command queue to initialize. : Maximum outstanding commands that can be queued. : FPA pool the command queues should come from. : Size of each buffer in the FPA pool (bytes)

Returns CVMX_CMD_QUEUE_SUCCESS or a failure code

Definition at line 111 of file cvmx-cmd-queue.c.

int cvmx_cmd_queue_length ( cvmx_cmd_queue_id_t  queue_id)

Return the number of command words pending in the queue. This function may be relatively slow for some hardware units.

: Hardware command queue to query

Returns Number of outstanding commands

Definition at line 241 of file cvmx-cmd-queue.c.

cvmx_cmd_queue_result_t cvmx_cmd_queue_shutdown ( cvmx_cmd_queue_id_t  queue_id)

Shutdown a queue a free it's command buffers to the FPA. The hardware connected to the queue must be stopped before this function is called.

: Queue to shutdown

Returns CVMX_CMD_QUEUE_SUCCESS or a failure code

Definition at line 206 of file cvmx-cmd-queue.c.

Variable Documentation

__cvmx_cmd_queue_all_state_t* __cvmx_cmd_queue_state_ptr

This application uses this pointer to access the global queue state. It points to a bootmem named block.

Definition at line 49 of file cvmx-cmd-queue.c.