Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sst25l.c File Reference
#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>

Go to the source code of this file.

Data Structures

struct  sst25l_flash
 
struct  flash_info
 

Macros

#define MAX_READY_WAIT_JIFFIES   msecs_to_jiffies(3000)
 
#define SST25L_CMD_WRSR   0x01 /* Write status register */
 
#define SST25L_CMD_WRDI   0x04 /* Write disable */
 
#define SST25L_CMD_RDSR   0x05 /* Read status register */
 
#define SST25L_CMD_WREN   0x06 /* Write enable */
 
#define SST25L_CMD_READ   0x03 /* High speed read */
 
#define SST25L_CMD_EWSR   0x50 /* Enable write status register */
 
#define SST25L_CMD_SECTOR_ERASE   0x20 /* Erase sector */
 
#define SST25L_CMD_READ_ID   0x90 /* Read device ID */
 
#define SST25L_CMD_AAI_PROGRAM   0xaf /* Auto address increment */
 
#define SST25L_STATUS_BUSY   (1 << 0) /* Chip is busy */
 
#define SST25L_STATUS_WREN   (1 << 1) /* Write enabled */
 
#define SST25L_STATUS_BP0   (1 << 2) /* Block protection 0 */
 
#define SST25L_STATUS_BP1   (1 << 3) /* Block protection 1 */
 
#define to_sst25l_flash(x)   container_of(x, struct sst25l_flash, mtd)
 

Functions

 module_spi_driver (sst25l_driver)
 
 MODULE_DESCRIPTION ("MTD SPI driver for SST25L Flash chips")
 
 MODULE_AUTHOR ("Andre Renaud <[email protected]>, ""Ryan Mallon")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define MAX_READY_WAIT_JIFFIES   msecs_to_jiffies(3000)

Definition at line 33 of file sst25l.c.

#define SST25L_CMD_AAI_PROGRAM   0xaf /* Auto address increment */

Definition at line 44 of file sst25l.c.

#define SST25L_CMD_EWSR   0x50 /* Enable write status register */

Definition at line 41 of file sst25l.c.

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

Definition at line 37 of file sst25l.c.

#define SST25L_CMD_READ   0x03 /* High speed read */

Definition at line 39 of file sst25l.c.

#define SST25L_CMD_READ_ID   0x90 /* Read device ID */

Definition at line 43 of file sst25l.c.

#define SST25L_CMD_SECTOR_ERASE   0x20 /* Erase sector */

Definition at line 42 of file sst25l.c.

#define SST25L_CMD_WRDI   0x04 /* Write disable */

Definition at line 36 of file sst25l.c.

#define SST25L_CMD_WREN   0x06 /* Write enable */

Definition at line 38 of file sst25l.c.

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

Definition at line 35 of file sst25l.c.

#define SST25L_STATUS_BP0   (1 << 2) /* Block protection 0 */

Definition at line 48 of file sst25l.c.

#define SST25L_STATUS_BP1   (1 << 3) /* Block protection 1 */

Definition at line 49 of file sst25l.c.

#define SST25L_STATUS_BUSY   (1 << 0) /* Chip is busy */

Definition at line 46 of file sst25l.c.

#define SST25L_STATUS_WREN   (1 << 1) /* Write enabled */

Definition at line 47 of file sst25l.c.

#define to_sst25l_flash (   x)    container_of(x, struct sst25l_flash, mtd)

Definition at line 65 of file sst25l.c.

Function Documentation

MODULE_AUTHOR ( "Andre Renaud <[email protected] ,
""Ryan Mallon"   
)
MODULE_DESCRIPTION ( "MTD SPI driver for SST25L Flash chips )
MODULE_LICENSE ( "GPL"  )
module_spi_driver ( sst25l_driver  )