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

Go to the source code of this file.

Data Structures

struct  dataflash
 
struct  flash_info
 

Macros

#define OP_READ_CONTINUOUS   0xE8
 
#define OP_READ_PAGE   0xD2
 
#define OP_READ_STATUS   0xD7 /* group B */
 
#define OP_READ_BUFFER1   0xD4 /* group B */
 
#define OP_READ_BUFFER2   0xD6 /* group B */
 
#define OP_WRITE_BUFFER1   0x84 /* group B */
 
#define OP_WRITE_BUFFER2   0x87 /* group B */
 
#define OP_ERASE_PAGE   0x81
 
#define OP_ERASE_BLOCK   0x50
 
#define OP_TRANSFER_BUF1   0x53
 
#define OP_TRANSFER_BUF2   0x55
 
#define OP_MREAD_BUFFER1   0xD4
 
#define OP_MREAD_BUFFER2   0xD6
 
#define OP_MWERASE_BUFFER1   0x83
 
#define OP_MWERASE_BUFFER2   0x86
 
#define OP_MWRITE_BUFFER1   0x88 /* sector must be pre-erased */
 
#define OP_MWRITE_BUFFER2   0x89 /* sector must be pre-erased */
 
#define OP_PROGRAM_VIA_BUF1   0x82
 
#define OP_PROGRAM_VIA_BUF2   0x85
 
#define OP_COMPARE_BUF1   0x60
 
#define OP_COMPARE_BUF2   0x61
 
#define OP_REWRITE_VIA_BUF1   0x58
 
#define OP_REWRITE_VIA_BUF2   0x59
 
#define OP_READ_ID   0x9F
 
#define OP_READ_SECURITY   0x77
 
#define OP_WRITE_SECURITY_REVC   0x9A
 
#define OP_WRITE_SECURITY   0x9B /* revision D */
 
#define dataflash_dt_ids   NULL
 
#define SUP_POW2PS   0x0002 /* supports 2^N byte pages */
 
#define IS_POW2PS   0x0001 /* uses 2^N byte pages */
 

Functions

 module_spi_driver (dataflash_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Andrew Victor, David Brownell")
 
 MODULE_DESCRIPTION ("MTD DataFlash driver")
 
 MODULE_ALIAS ("spi:mtd_dataflash")
 

Macro Definition Documentation

#define dataflash_dt_ids   NULL

Definition at line 109 of file mtd_dataflash.c.

#define IS_POW2PS   0x0001 /* uses 2^N byte pages */

Definition at line 705 of file mtd_dataflash.c.

#define OP_COMPARE_BUF1   0x60

Definition at line 71 of file mtd_dataflash.c.

#define OP_COMPARE_BUF2   0x61

Definition at line 72 of file mtd_dataflash.c.

#define OP_ERASE_BLOCK   0x50

Definition at line 54 of file mtd_dataflash.c.

#define OP_ERASE_PAGE   0x81

Definition at line 53 of file mtd_dataflash.c.

#define OP_MREAD_BUFFER1   0xD4

Definition at line 59 of file mtd_dataflash.c.

#define OP_MREAD_BUFFER2   0xD6

Definition at line 60 of file mtd_dataflash.c.

#define OP_MWERASE_BUFFER1   0x83

Definition at line 61 of file mtd_dataflash.c.

#define OP_MWERASE_BUFFER2   0x86

Definition at line 62 of file mtd_dataflash.c.

#define OP_MWRITE_BUFFER1   0x88 /* sector must be pre-erased */

Definition at line 63 of file mtd_dataflash.c.

#define OP_MWRITE_BUFFER2   0x89 /* sector must be pre-erased */

Definition at line 64 of file mtd_dataflash.c.

#define OP_PROGRAM_VIA_BUF1   0x82

Definition at line 67 of file mtd_dataflash.c.

#define OP_PROGRAM_VIA_BUF2   0x85

Definition at line 68 of file mtd_dataflash.c.

#define OP_READ_BUFFER1   0xD4 /* group B */

Definition at line 47 of file mtd_dataflash.c.

#define OP_READ_BUFFER2   0xD6 /* group B */

Definition at line 48 of file mtd_dataflash.c.

#define OP_READ_CONTINUOUS   0xE8

Definition at line 40 of file mtd_dataflash.c.

#define OP_READ_ID   0x9F

Definition at line 81 of file mtd_dataflash.c.

#define OP_READ_PAGE   0xD2

Definition at line 41 of file mtd_dataflash.c.

#define OP_READ_SECURITY   0x77

Definition at line 82 of file mtd_dataflash.c.

#define OP_READ_STATUS   0xD7 /* group B */

Definition at line 44 of file mtd_dataflash.c.

#define OP_REWRITE_VIA_BUF1   0x58

Definition at line 75 of file mtd_dataflash.c.

#define OP_REWRITE_VIA_BUF2   0x59

Definition at line 76 of file mtd_dataflash.c.

#define OP_TRANSFER_BUF1   0x53

Definition at line 57 of file mtd_dataflash.c.

#define OP_TRANSFER_BUF2   0x55

Definition at line 58 of file mtd_dataflash.c.

#define OP_WRITE_BUFFER1   0x84 /* group B */

Definition at line 49 of file mtd_dataflash.c.

#define OP_WRITE_BUFFER2   0x87 /* group B */

Definition at line 50 of file mtd_dataflash.c.

#define OP_WRITE_SECURITY   0x9B /* revision D */

Definition at line 84 of file mtd_dataflash.c.

#define OP_WRITE_SECURITY_REVC   0x9A

Definition at line 83 of file mtd_dataflash.c.

#define SUP_POW2PS   0x0002 /* supports 2^N byte pages */

Definition at line 704 of file mtd_dataflash.c.

Function Documentation

MODULE_ALIAS ( "spi:mtd_dataflash"  )
MODULE_AUTHOR ( "Andrew  Victor,
David Brownell"   
)
MODULE_DESCRIPTION ( "MTD DataFlash driver )
MODULE_LICENSE ( "GPL"  )
module_spi_driver ( dataflash_driver  )