Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cvmx-spi.c File Reference
#include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-config.h>
#include <asm/octeon/cvmx-pko.h>
#include <asm/octeon/cvmx-spi.h>
#include <asm/octeon/cvmx-spxx-defs.h>
#include <asm/octeon/cvmx-stxx-defs.h>
#include <asm/octeon/cvmx-srxx-defs.h>

Go to the source code of this file.

Macros

#define INVOKE_CB(function_p, args...)
 

Functions

void cvmx_spi_get_callbacks (cvmx_spi_callbacks_t *callbacks)
 
void cvmx_spi_set_callbacks (cvmx_spi_callbacks_t *new_callbacks)
 
int cvmx_spi_start_interface (int interface, cvmx_spi_mode_t mode, int timeout, int num_ports)
 
int cvmx_spi_restart_interface (int interface, cvmx_spi_mode_t mode, int timeout)
 
int cvmx_spi_reset_cb (int interface, cvmx_spi_mode_t mode)
 
int cvmx_spi_calendar_setup_cb (int interface, cvmx_spi_mode_t mode, int num_ports)
 
int cvmx_spi_clock_detect_cb (int interface, cvmx_spi_mode_t mode, int timeout)
 
int cvmx_spi_training_cb (int interface, cvmx_spi_mode_t mode, int timeout)
 
int cvmx_spi_calendar_sync_cb (int interface, cvmx_spi_mode_t mode, int timeout)
 
int cvmx_spi_interface_up_cb (int interface, cvmx_spi_mode_t mode)
 

Macro Definition Documentation

#define INVOKE_CB (   function_p,
  args... 
)
Value:
do { \
if (function_p) { \
res = function_p(args); \
if (res) \
return res; \
} \
} while (0)

Definition at line 43 of file cvmx-spi.c.

Function Documentation

int cvmx_spi_calendar_setup_cb ( int  interface,
cvmx_spi_mode_t  mode,
int  num_ports 
)

Definition at line 310 of file cvmx-spi.c.

int cvmx_spi_calendar_sync_cb ( int  interface,
cvmx_spi_mode_t  mode,
int  timeout 
)

Definition at line 576 of file cvmx-spi.c.

int cvmx_spi_clock_detect_cb ( int  interface,
cvmx_spi_mode_t  mode,
int  timeout 
)

Definition at line 429 of file cvmx-spi.c.

void cvmx_spi_get_callbacks ( cvmx_spi_callbacks_t callbacks)

Get current SPI4 initialization callbacks

: Pointer to the callbacks structure.to fill

Returns Pointer to cvmx_spi_callbacks_t structure.

Definition at line 76 of file cvmx-spi.c.

int cvmx_spi_interface_up_cb ( int  interface,
cvmx_spi_mode_t  mode 
)

Definition at line 632 of file cvmx-spi.c.

int cvmx_spi_reset_cb ( int  interface,
cvmx_spi_mode_t  mode 
)

Definition at line 194 of file cvmx-spi.c.

int cvmx_spi_restart_interface ( int  interface,
cvmx_spi_mode_t  mode,
int  timeout 
)

Definition at line 150 of file cvmx-spi.c.

void cvmx_spi_set_callbacks ( cvmx_spi_callbacks_t new_callbacks)

Set new SPI4 initialization callbacks

: Pointer to an updated callbacks structure.

Definition at line 86 of file cvmx-spi.c.

int cvmx_spi_start_interface ( int  interface,
cvmx_spi_mode_t  mode,
int  timeout,
int  num_ports 
)

Definition at line 105 of file cvmx-spi.c.

int cvmx_spi_training_cb ( int  interface,
cvmx_spi_mode_t  mode,
int  timeout 
)

Definition at line 507 of file cvmx-spi.c.