Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spi.h File Reference
#include "net_driver.h"

Go to the source code of this file.

Data Structures

struct  efx_spi_device
 

Macros

#define SPI_WRSR   0x01 /* Write status register */
 
#define SPI_WRITE   0x02 /* Write data to memory array */
 
#define SPI_READ   0x03 /* Read data from memory array */
 
#define SPI_WRDI   0x04 /* Reset write enable latch */
 
#define SPI_RDSR   0x05 /* Read status register */
 
#define SPI_WREN   0x06 /* Set write enable latch */
 
#define SPI_SST_EWSR   0x50 /* SST: Enable write to status register */
 
#define SPI_STATUS_WPEN   0x80 /* Write-protect pin enabled */
 
#define SPI_STATUS_BP2   0x10 /* Block protection bit 2 */
 
#define SPI_STATUS_BP1   0x08 /* Block protection bit 1 */
 
#define SPI_STATUS_BP0   0x04 /* Block protection bit 0 */
 
#define SPI_STATUS_WEN   0x02 /* State of the write enable latch */
 
#define SPI_STATUS_NRDY   0x01 /* Device busy flag */
 
#define FALCON_NVCONFIG_END   0x400U
 
#define FALCON_FLASH_BOOTCODE_START   0x8000U
 
#define EFX_EEPROM_BOOTCONFIG_START   0x800U
 
#define EFX_EEPROM_BOOTCONFIG_END   0x1800U
 

Functions

int falcon_spi_cmd (struct efx_nic *efx, const struct efx_spi_device *spi, unsigned int command, int address, const void *in, void *out, size_t len)
 
int falcon_spi_wait_write (struct efx_nic *efx, const struct efx_spi_device *spi)
 
int falcon_spi_read (struct efx_nic *efx, const struct efx_spi_device *spi, loff_t start, size_t len, size_t *retlen, u8 *buffer)
 
int falcon_spi_write (struct efx_nic *efx, const struct efx_spi_device *spi, loff_t start, size_t len, size_t *retlen, const u8 *buffer)
 

Macro Definition Documentation

#define EFX_EEPROM_BOOTCONFIG_END   0x1800U

Definition at line 97 of file spi.h.

#define EFX_EEPROM_BOOTCONFIG_START   0x800U

Definition at line 96 of file spi.h.

#define FALCON_FLASH_BOOTCODE_START   0x8000U

Definition at line 95 of file spi.h.

#define FALCON_NVCONFIG_END   0x400U

Definition at line 94 of file spi.h.

#define SPI_RDSR   0x05 /* Read status register */

Definition at line 26 of file spi.h.

#define SPI_READ   0x03 /* Read data from memory array */

Definition at line 24 of file spi.h.

#define SPI_SST_EWSR   0x50 /* SST: Enable write to status register */

Definition at line 28 of file spi.h.

#define SPI_STATUS_BP0   0x04 /* Block protection bit 0 */

Definition at line 33 of file spi.h.

#define SPI_STATUS_BP1   0x08 /* Block protection bit 1 */

Definition at line 32 of file spi.h.

#define SPI_STATUS_BP2   0x10 /* Block protection bit 2 */

Definition at line 31 of file spi.h.

#define SPI_STATUS_NRDY   0x01 /* Device busy flag */

Definition at line 35 of file spi.h.

#define SPI_STATUS_WEN   0x02 /* State of the write enable latch */

Definition at line 34 of file spi.h.

#define SPI_STATUS_WPEN   0x80 /* Write-protect pin enabled */

Definition at line 30 of file spi.h.

#define SPI_WRDI   0x04 /* Reset write enable latch */

Definition at line 25 of file spi.h.

#define SPI_WREN   0x06 /* Set write enable latch */

Definition at line 27 of file spi.h.

#define SPI_WRITE   0x02 /* Write data to memory array */

Definition at line 23 of file spi.h.

#define SPI_WRSR   0x01 /* Write status register */

Definition at line 22 of file spi.h.

Function Documentation

int falcon_spi_cmd ( struct efx_nic efx,
const struct efx_spi_device spi,
unsigned int  command,
int  address,
const void in,
void out,
size_t  len 
)

Definition at line 244 of file falcon.c.

int falcon_spi_read ( struct efx_nic efx,
const struct efx_spi_device spi,
loff_t  start,
size_t  len,
size_t retlen,
u8 buffer 
)

Definition at line 340 of file falcon.c.

int falcon_spi_wait_write ( struct efx_nic efx,
const struct efx_spi_device spi 
)

Definition at line 316 of file falcon.c.

int falcon_spi_write ( struct efx_nic efx,
const struct efx_spi_device spi,
loff_t  start,
size_t  len,
size_t retlen,
const u8 buffer 
)

Definition at line 371 of file falcon.c.