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

Go to the source code of this file.

Macros

#define SPI_NO_ERR   0x00
 
#define SPI_HW_ERR   0x01
 
#define SPI_INVALID_COMMAND   0x02
 
#define SPI_READ_ERR   0x03
 
#define SPI_WRITE_ERR   0x04
 
#define SPI_ERASE_ERR   0x05
 
#define SPI_BUSY_ERR   0x06
 
#define SPI_READ   0x03
 
#define SPI_FAST_READ   0x0B
 
#define SPI_WREN   0x06
 
#define SPI_WRDI   0x04
 
#define SPI_RDSR   0x05
 
#define SF_PAGE_LEN   256
 
#define BYTE_PROGRAM   0
 
#define AAI_PROGRAM   1
 
#define PAGE_PROGRAM   2
 
#define PAGE_ERASE   0
 
#define CHIP_ERASE   1
 

Functions

int spi_erase_eeprom_chip (struct rtsx_chip *chip)
 
int spi_erase_eeprom_byte (struct rtsx_chip *chip, u16 addr)
 
int spi_read_eeprom (struct rtsx_chip *chip, u16 addr, u8 *val)
 
int spi_write_eeprom (struct rtsx_chip *chip, u16 addr, u8 val)
 
int spi_get_status (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int spi_set_parameter (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int spi_read_flash_id (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int spi_read_flash (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int spi_write_flash (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int spi_erase_flash (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
int spi_write_flash_status (struct scsi_cmnd *srb, struct rtsx_chip *chip)
 

Macro Definition Documentation

#define AAI_PROGRAM   1

Definition at line 46 of file spi.h.

#define BYTE_PROGRAM   0

Definition at line 45 of file spi.h.

#define CHIP_ERASE   1

Definition at line 50 of file spi.h.

#define PAGE_ERASE   0

Definition at line 49 of file spi.h.

#define PAGE_PROGRAM   2

Definition at line 47 of file spi.h.

#define SF_PAGE_LEN   256

Definition at line 43 of file spi.h.

#define SPI_BUSY_ERR   0x06

Definition at line 34 of file spi.h.

#define SPI_ERASE_ERR   0x05

Definition at line 33 of file spi.h.

#define SPI_FAST_READ   0x0B

Definition at line 38 of file spi.h.

#define SPI_HW_ERR   0x01

Definition at line 29 of file spi.h.

#define SPI_INVALID_COMMAND   0x02

Definition at line 30 of file spi.h.

#define SPI_NO_ERR   0x00

Definition at line 28 of file spi.h.

#define SPI_RDSR   0x05

Definition at line 41 of file spi.h.

#define SPI_READ   0x03

Definition at line 37 of file spi.h.

#define SPI_READ_ERR   0x03

Definition at line 31 of file spi.h.

#define SPI_WRDI   0x04

Definition at line 40 of file spi.h.

#define SPI_WREN   0x06

Definition at line 39 of file spi.h.

#define SPI_WRITE_ERR   0x04

Definition at line 32 of file spi.h.

Function Documentation

int spi_erase_eeprom_byte ( struct rtsx_chip chip,
u16  addr 
)

Definition at line 272 of file spi.c.

int spi_erase_eeprom_chip ( struct rtsx_chip chip)

Definition at line 242 of file spi.c.

int spi_erase_flash ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 730 of file spi.c.

int spi_get_status ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 375 of file spi.c.

int spi_read_eeprom ( struct rtsx_chip chip,
u16  addr,
u8 val 
)

Definition at line 305 of file spi.c.

int spi_read_flash ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 486 of file spi.c.

int spi_read_flash_id ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 406 of file spi.c.

int spi_set_parameter ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 386 of file spi.c.

int spi_write_eeprom ( struct rtsx_chip chip,
u16  addr,
u8  val 
)

Definition at line 341 of file spi.c.

int spi_write_flash ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 564 of file spi.c.

int spi_write_flash_status ( struct scsi_cmnd srb,
struct rtsx_chip chip 
)

Definition at line 772 of file spi.c.