Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
nandsim.c File Reference
#include <linux/init.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/vmalloc.h>
#include <linux/math64.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/nand_bch.h>
#include <linux/mtd/partitions.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <linux/random.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/pagemap.h>

Go to the source code of this file.

Data Structures

union  ns_mem
 
struct  nandsim
 
struct  nandsim_operations
 
struct  weak_block
 
struct  weak_page
 
struct  grave_page
 

Macros

#define CONFIG_NANDSIM_FIRST_ID_BYTE   0x98
 
#define CONFIG_NANDSIM_SECOND_ID_BYTE   0x39
 
#define CONFIG_NANDSIM_THIRD_ID_BYTE   0xFF /* No byte */
 
#define CONFIG_NANDSIM_FOURTH_ID_BYTE   0xFF /* No byte */
 
#define CONFIG_NANDSIM_ACCESS_DELAY   25
 
#define CONFIG_NANDSIM_PROGRAMM_DELAY   200
 
#define CONFIG_NANDSIM_ERASE_DELAY   2
 
#define CONFIG_NANDSIM_OUTPUT_CYCLE   40
 
#define CONFIG_NANDSIM_INPUT_CYCLE   50
 
#define CONFIG_NANDSIM_BUS_WIDTH   8
 
#define CONFIG_NANDSIM_DO_DELAYS   0
 
#define CONFIG_NANDSIM_LOG   0
 
#define CONFIG_NANDSIM_DBG   0
 
#define CONFIG_NANDSIM_MAX_PARTS   32
 
#define NS_LARGEST_PAGE_SIZE   4096
 
#define NS_OUTPUT_PREFIX   "[nandsim]"
 
#define NS_LOG(args...)   do { if (log) printk(KERN_DEBUG NS_OUTPUT_PREFIX " log: " args); } while(0)
 
#define NS_DBG(args...)   do { if (dbg) printk(KERN_DEBUG NS_OUTPUT_PREFIX " debug: " args); } while(0)
 
#define NS_WARN(args...)   do { printk(KERN_WARNING NS_OUTPUT_PREFIX " warning: " args); } while(0)
 
#define NS_ERR(args...)   do { printk(KERN_ERR NS_OUTPUT_PREFIX " error: " args); } while(0)
 
#define NS_INFO(args...)   do { printk(KERN_INFO NS_OUTPUT_PREFIX " " args); } while(0)
 
#define NS_UDELAY(us)   do { if (do_delays) udelay(us); } while(0)
 
#define NS_MDELAY(us)   do { if (do_delays) mdelay(us); } while(0)
 
#define NS_IS_INITIALIZED(ns)   ((ns)->geom.totsz != 0)
 
#define NS_STATUS_OK(ns)   (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0)))
 
#define NS_STATUS_FAILED(ns)   (NAND_STATUS_FAIL | NS_STATUS_OK(ns))
 
#define NS_RAW_OFFSET(ns)   (((ns)->regs.row << (ns)->geom.pgshift) + ((ns)->regs.row * (ns)->geom.oobsz) + (ns)->regs.column)
 
#define NS_RAW_OFFSET_OOB(ns)   (NS_RAW_OFFSET(ns) + ns->geom.pgsz)
 
#define STATE_CMD_READ0   0x00000001 /* read data from the beginning of page */
 
#define STATE_CMD_READ1   0x00000002 /* read data from the second half of page */
 
#define STATE_CMD_READSTART   0x00000003 /* read data second command (large page devices) */
 
#define STATE_CMD_PAGEPROG   0x00000004 /* start page program */
 
#define STATE_CMD_READOOB   0x00000005 /* read OOB area */
 
#define STATE_CMD_ERASE1   0x00000006 /* sector erase first command */
 
#define STATE_CMD_STATUS   0x00000007 /* read status */
 
#define STATE_CMD_STATUS_M   0x00000008 /* read multi-plane status (isn't implemented) */
 
#define STATE_CMD_SEQIN   0x00000009 /* sequential data input */
 
#define STATE_CMD_READID   0x0000000A /* read ID */
 
#define STATE_CMD_ERASE2   0x0000000B /* sector erase second command */
 
#define STATE_CMD_RESET   0x0000000C /* reset */
 
#define STATE_CMD_RNDOUT   0x0000000D /* random output command */
 
#define STATE_CMD_RNDOUTSTART   0x0000000E /* random output start command */
 
#define STATE_CMD_MASK   0x0000000F /* command states mask */
 
#define STATE_ADDR_PAGE   0x00000010 /* full (row, column) address is accepted */
 
#define STATE_ADDR_SEC   0x00000020 /* sector address was accepted */
 
#define STATE_ADDR_COLUMN   0x00000030 /* column address was accepted */
 
#define STATE_ADDR_ZERO   0x00000040 /* one byte zero address was accepted */
 
#define STATE_ADDR_MASK   0x00000070 /* address states mask */
 
#define STATE_DATAIN   0x00000100 /* waiting for data input */
 
#define STATE_DATAIN_MASK   0x00000100 /* data input states mask */
 
#define STATE_DATAOUT   0x00001000 /* waiting for page data output */
 
#define STATE_DATAOUT_ID   0x00002000 /* waiting for ID bytes output */
 
#define STATE_DATAOUT_STATUS   0x00003000 /* waiting for status output */
 
#define STATE_DATAOUT_STATUS_M   0x00004000 /* waiting for multi-plane status output */
 
#define STATE_DATAOUT_MASK   0x00007000 /* data output states mask */
 
#define STATE_READY   0x00000000
 
#define STATE_UNKNOWN   0x10000000
 
#define ACTION_CPY   0x00100000 /* copy page/OOB to the internal buffer */
 
#define ACTION_PRGPAGE   0x00200000 /* program the internal buffer to flash */
 
#define ACTION_SECERASE   0x00300000 /* erase sector */
 
#define ACTION_ZEROOFF   0x00400000 /* don't add any offset to address */
 
#define ACTION_HALFOFF   0x00500000 /* add to address half of page */
 
#define ACTION_OOBOFF   0x00600000 /* add to address OOB offset */
 
#define ACTION_MASK   0x00700000 /* action mask */
 
#define NS_OPER_NUM   13 /* Number of operations supported by the simulator */
 
#define NS_OPER_STATES   6 /* Maximum number of states in operation */
 
#define OPT_ANY   0xFFFFFFFF /* any chip supports this operation */
 
#define OPT_PAGE256   0x00000001 /* 256-byte page chips */
 
#define OPT_PAGE512   0x00000002 /* 512-byte page chips */
 
#define OPT_PAGE2048   0x00000008 /* 2048-byte page chips */
 
#define OPT_SMARTMEDIA   0x00000010 /* SmartMedia technology chips */
 
#define OPT_PAGE512_8BIT   0x00000040 /* 512-byte page chips with 8-bit bus width */
 
#define OPT_PAGE4096   0x00000080 /* 4096-byte page chips */
 
#define OPT_LARGEPAGE   (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */
 
#define OPT_SMALLPAGE   (OPT_PAGE256 | OPT_PAGE512) /* 256 and 512-byte page chips */
 
#define NS_STATE(x)   ((x) & ~ACTION_MASK)
 
#define NS_MAX_PREVSTATES   1
 
#define NS_MAX_HELD_PAGES   16
 

Functions

 module_param (first_id_byte, uint, 0400)
 
 module_param (second_id_byte, uint, 0400)
 
 module_param (third_id_byte, uint, 0400)
 
 module_param (fourth_id_byte, uint, 0400)
 
 module_param (access_delay, uint, 0400)
 
 module_param (programm_delay, uint, 0400)
 
 module_param (erase_delay, uint, 0400)
 
 module_param (output_cycle, uint, 0400)
 
 module_param (input_cycle, uint, 0400)
 
 module_param (bus_width, uint, 0400)
 
 module_param (do_delays, uint, 0400)
 
 module_param (log, uint, 0400)
 
 module_param (dbg, uint, 0400)
 
 module_param_array (parts, ulong,&parts_num, 0400)
 
 module_param (badblocks, charp, 0400)
 
 module_param (weakblocks, charp, 0400)
 
 module_param (weakpages, charp, 0400)
 
 module_param (bitflips, uint, 0400)
 
 module_param (gravepages, charp, 0400)
 
 module_param (rptwear, uint, 0400)
 
 module_param (overridesize, uint, 0400)
 
 module_param (cache_file, charp, 0400)
 
 module_param (bbt, uint, 0400)
 
 module_param (bch, uint, 0400)
 
 MODULE_PARM_DESC (first_id_byte,"The first byte returned by NAND Flash 'read ID' command (manufacturer ID)")
 
 MODULE_PARM_DESC (second_id_byte,"The second byte returned by NAND Flash 'read ID' command (chip ID)")
 
 MODULE_PARM_DESC (third_id_byte,"The third byte returned by NAND Flash 'read ID' command")
 
 MODULE_PARM_DESC (fourth_id_byte,"The fourth byte returned by NAND Flash 'read ID' command")
 
 MODULE_PARM_DESC (access_delay,"Initial page access delay (microseconds)")
 
 MODULE_PARM_DESC (programm_delay,"Page programm delay (microseconds")
 
 MODULE_PARM_DESC (erase_delay,"Sector erase delay (milliseconds)")
 
 MODULE_PARM_DESC (output_cycle,"Word output (from flash) time (nanoseconds)")
 
 MODULE_PARM_DESC (input_cycle,"Word input (to flash) time (nanoseconds)")
 
 MODULE_PARM_DESC (bus_width,"Chip's bus width (8- or 16-bit)")
 
 MODULE_PARM_DESC (do_delays,"Simulate NAND delays using busy-waits if not zero")
 
 MODULE_PARM_DESC (log,"Perform logging if not zero")
 
 MODULE_PARM_DESC (dbg,"Output debug information if not zero")
 
 MODULE_PARM_DESC (parts,"Partition sizes (in erase blocks) separated by commas")
 
 MODULE_PARM_DESC (badblocks,"Erase blocks that are initially marked bad, separated by commas")
 
 MODULE_PARM_DESC (weakblocks,"Weak erase blocks [: remaining erase cycles (defaults to 3)]"" separated by commas e.g. 113:2 means eb 113"" can be erased only twice before failing")
 
 MODULE_PARM_DESC (weakpages,"Weak pages [: maximum writes (defaults to 3)]"" separated by commas e.g. 1401:2 means page 1401"" can be written only twice before failing")
 
 MODULE_PARM_DESC (bitflips,"Maximum number of random bit flips per page (zero by default)")
 
 MODULE_PARM_DESC (gravepages,"Pages that lose data [: maximum reads (defaults to 3)]"" separated by commas e.g. 1401:2 means page 1401"" can be read only twice before failing")
 
 MODULE_PARM_DESC (rptwear,"Number of erases between reporting wear, if not zero")
 
 MODULE_PARM_DESC (overridesize,"Specifies the NAND Flash size overriding the ID bytes. ""The size is specified in erase blocks and as the exponent of a power of two"" e.g. 5 means a size of 32 erase blocks")
 
 MODULE_PARM_DESC (cache_file,"File to use to cache nand pages instead of memory")
 
 MODULE_PARM_DESC (bbt,"0 OOB, 1 BBT with marker in OOB, 2 BBT with marker in data area")
 
 MODULE_PARM_DESC (bch,"Enable BCH ecc and set how many bits should ""be correctable in 512-byte blocks")
 
int do_read_error (struct nandsim *ns, int num)
 
void do_bit_flips (struct nandsim *ns, int num)
 
 module_init (ns_init_module)
 
 module_exit (ns_cleanup_module)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Artem B. Bityuckiy")
 
 MODULE_DESCRIPTION ("The NAND flash simulator")
 

Macro Definition Documentation

#define ACTION_CPY   0x00100000 /* copy page/OOB to the internal buffer */

Definition at line 255 of file nandsim.c.

#define ACTION_HALFOFF   0x00500000 /* add to address half of page */

Definition at line 259 of file nandsim.c.

#define ACTION_MASK   0x00700000 /* action mask */

Definition at line 261 of file nandsim.c.

#define ACTION_OOBOFF   0x00600000 /* add to address OOB offset */

Definition at line 260 of file nandsim.c.

#define ACTION_PRGPAGE   0x00200000 /* program the internal buffer to flash */

Definition at line 256 of file nandsim.c.

#define ACTION_SECERASE   0x00300000 /* erase sector */

Definition at line 257 of file nandsim.c.

#define ACTION_ZEROOFF   0x00400000 /* don't add any offset to address */

Definition at line 258 of file nandsim.c.

#define CONFIG_NANDSIM_ACCESS_DELAY   25

Definition at line 58 of file nandsim.c.

#define CONFIG_NANDSIM_BUS_WIDTH   8

Definition at line 73 of file nandsim.c.

#define CONFIG_NANDSIM_DBG   0

Definition at line 82 of file nandsim.c.

#define CONFIG_NANDSIM_DO_DELAYS   0

Definition at line 76 of file nandsim.c.

#define CONFIG_NANDSIM_ERASE_DELAY   2

Definition at line 64 of file nandsim.c.

#define CONFIG_NANDSIM_FIRST_ID_BYTE   0x98

Definition at line 51 of file nandsim.c.

#define CONFIG_NANDSIM_FOURTH_ID_BYTE   0xFF /* No byte */

Definition at line 54 of file nandsim.c.

#define CONFIG_NANDSIM_INPUT_CYCLE   50

Definition at line 70 of file nandsim.c.

#define CONFIG_NANDSIM_LOG   0

Definition at line 79 of file nandsim.c.

#define CONFIG_NANDSIM_MAX_PARTS   32

Definition at line 85 of file nandsim.c.

#define CONFIG_NANDSIM_OUTPUT_CYCLE   40

Definition at line 67 of file nandsim.c.

#define CONFIG_NANDSIM_PROGRAMM_DELAY   200

Definition at line 61 of file nandsim.c.

#define CONFIG_NANDSIM_SECOND_ID_BYTE   0x39

Definition at line 52 of file nandsim.c.

#define CONFIG_NANDSIM_THIRD_ID_BYTE   0xFF /* No byte */

Definition at line 53 of file nandsim.c.

#define NS_DBG (   args...)    do { if (dbg) printk(KERN_DEBUG NS_OUTPUT_PREFIX " debug: " args); } while(0)

Definition at line 183 of file nandsim.c.

#define NS_ERR (   args...)    do { printk(KERN_ERR NS_OUTPUT_PREFIX " error: " args); } while(0)

Definition at line 187 of file nandsim.c.

#define NS_INFO (   args...)    do { printk(KERN_INFO NS_OUTPUT_PREFIX " " args); } while(0)

Definition at line 189 of file nandsim.c.

#define NS_IS_INITIALIZED (   ns)    ((ns)->geom.totsz != 0)

Definition at line 199 of file nandsim.c.

#define NS_LARGEST_PAGE_SIZE   4096

Definition at line 175 of file nandsim.c.

#define NS_LOG (   args...)    do { if (log) printk(KERN_DEBUG NS_OUTPUT_PREFIX " log: " args); } while(0)

Definition at line 181 of file nandsim.c.

#define NS_MAX_HELD_PAGES   16

Definition at line 287 of file nandsim.c.

#define NS_MAX_PREVSTATES   1

Definition at line 284 of file nandsim.c.

#define NS_MDELAY (   us)    do { if (do_delays) mdelay(us); } while(0)

Definition at line 195 of file nandsim.c.

#define NS_OPER_NUM   13 /* Number of operations supported by the simulator */

Definition at line 263 of file nandsim.c.

#define NS_OPER_STATES   6 /* Maximum number of states in operation */

Definition at line 264 of file nandsim.c.

#define NS_OUTPUT_PREFIX   "[nandsim]"

Definition at line 178 of file nandsim.c.

#define NS_RAW_OFFSET (   ns)    (((ns)->regs.row << (ns)->geom.pgshift) + ((ns)->regs.row * (ns)->geom.oobsz) + (ns)->regs.column)

Definition at line 208 of file nandsim.c.

#define NS_RAW_OFFSET_OOB (   ns)    (NS_RAW_OFFSET(ns) + ns->geom.pgsz)

Definition at line 212 of file nandsim.c.

#define NS_STATE (   x)    ((x) & ~ACTION_MASK)

Definition at line 277 of file nandsim.c.

#define NS_STATUS_FAILED (   ns)    (NAND_STATUS_FAIL | NS_STATUS_OK(ns))

Definition at line 205 of file nandsim.c.

#define NS_STATUS_OK (   ns)    (NAND_STATUS_READY | (NAND_STATUS_WP * ((ns)->lines.wp == 0)))

Definition at line 202 of file nandsim.c.

#define NS_UDELAY (   us)    do { if (do_delays) udelay(us); } while(0)

Definition at line 193 of file nandsim.c.

#define NS_WARN (   args...)    do { printk(KERN_WARNING NS_OUTPUT_PREFIX " warning: " args); } while(0)

Definition at line 185 of file nandsim.c.

#define OPT_ANY   0xFFFFFFFF /* any chip supports this operation */

Definition at line 266 of file nandsim.c.

#define OPT_LARGEPAGE   (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */

Definition at line 273 of file nandsim.c.

#define OPT_PAGE2048   0x00000008 /* 2048-byte page chips */

Definition at line 269 of file nandsim.c.

#define OPT_PAGE256   0x00000001 /* 256-byte page chips */

Definition at line 267 of file nandsim.c.

#define OPT_PAGE4096   0x00000080 /* 4096-byte page chips */

Definition at line 272 of file nandsim.c.

#define OPT_PAGE512   0x00000002 /* 512-byte page chips */

Definition at line 268 of file nandsim.c.

#define OPT_PAGE512_8BIT   0x00000040 /* 512-byte page chips with 8-bit bus width */

Definition at line 271 of file nandsim.c.

#define OPT_SMALLPAGE   (OPT_PAGE256 | OPT_PAGE512) /* 256 and 512-byte page chips */

Definition at line 274 of file nandsim.c.

#define OPT_SMARTMEDIA   0x00000010 /* SmartMedia technology chips */

Definition at line 270 of file nandsim.c.

#define STATE_ADDR_COLUMN   0x00000030 /* column address was accepted */

Definition at line 234 of file nandsim.c.

#define STATE_ADDR_MASK   0x00000070 /* address states mask */

Definition at line 236 of file nandsim.c.

#define STATE_ADDR_PAGE   0x00000010 /* full (row, column) address is accepted */

Definition at line 232 of file nandsim.c.

#define STATE_ADDR_SEC   0x00000020 /* sector address was accepted */

Definition at line 233 of file nandsim.c.

#define STATE_ADDR_ZERO   0x00000040 /* one byte zero address was accepted */

Definition at line 235 of file nandsim.c.

#define STATE_CMD_ERASE1   0x00000006 /* sector erase first command */

Definition at line 220 of file nandsim.c.

#define STATE_CMD_ERASE2   0x0000000B /* sector erase second command */

Definition at line 225 of file nandsim.c.

#define STATE_CMD_MASK   0x0000000F /* command states mask */

Definition at line 229 of file nandsim.c.

#define STATE_CMD_PAGEPROG   0x00000004 /* start page program */

Definition at line 218 of file nandsim.c.

#define STATE_CMD_READ0   0x00000001 /* read data from the beginning of page */

Definition at line 215 of file nandsim.c.

#define STATE_CMD_READ1   0x00000002 /* read data from the second half of page */

Definition at line 216 of file nandsim.c.

#define STATE_CMD_READID   0x0000000A /* read ID */

Definition at line 224 of file nandsim.c.

#define STATE_CMD_READOOB   0x00000005 /* read OOB area */

Definition at line 219 of file nandsim.c.

#define STATE_CMD_READSTART   0x00000003 /* read data second command (large page devices) */

Definition at line 217 of file nandsim.c.

#define STATE_CMD_RESET   0x0000000C /* reset */

Definition at line 226 of file nandsim.c.

#define STATE_CMD_RNDOUT   0x0000000D /* random output command */

Definition at line 227 of file nandsim.c.

#define STATE_CMD_RNDOUTSTART   0x0000000E /* random output start command */

Definition at line 228 of file nandsim.c.

#define STATE_CMD_SEQIN   0x00000009 /* sequential data input */

Definition at line 223 of file nandsim.c.

#define STATE_CMD_STATUS   0x00000007 /* read status */

Definition at line 221 of file nandsim.c.

#define STATE_CMD_STATUS_M   0x00000008 /* read multi-plane status (isn't implemented) */

Definition at line 222 of file nandsim.c.

#define STATE_DATAIN   0x00000100 /* waiting for data input */

Definition at line 239 of file nandsim.c.

#define STATE_DATAIN_MASK   0x00000100 /* data input states mask */

Definition at line 240 of file nandsim.c.

#define STATE_DATAOUT   0x00001000 /* waiting for page data output */

Definition at line 242 of file nandsim.c.

#define STATE_DATAOUT_ID   0x00002000 /* waiting for ID bytes output */

Definition at line 243 of file nandsim.c.

#define STATE_DATAOUT_MASK   0x00007000 /* data output states mask */

Definition at line 246 of file nandsim.c.

#define STATE_DATAOUT_STATUS   0x00003000 /* waiting for status output */

Definition at line 244 of file nandsim.c.

#define STATE_DATAOUT_STATUS_M   0x00004000 /* waiting for multi-plane status output */

Definition at line 245 of file nandsim.c.

#define STATE_READY   0x00000000

Definition at line 249 of file nandsim.c.

#define STATE_UNKNOWN   0x10000000

Definition at line 252 of file nandsim.c.

Function Documentation

void do_bit_flips ( struct nandsim ns,
int  num 
)

Definition at line 1410 of file nandsim.c.

int do_read_error ( struct nandsim ns,
int  num 
)

Definition at line 1395 of file nandsim.c.

MODULE_AUTHOR ( "Artem B. Bityuckiy"  )
MODULE_DESCRIPTION ( "The NAND flash simulator"  )
module_exit ( ns_cleanup_module  )
module_init ( ns_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( first_id_byte  ,
uint  ,
0400   
)
module_param ( second_id_byte  ,
uint  ,
0400   
)
module_param ( third_id_byte  ,
uint  ,
0400   
)
module_param ( fourth_id_byte  ,
uint  ,
0400   
)
module_param ( access_delay  ,
uint  ,
0400   
)
module_param ( programm_delay  ,
uint  ,
0400   
)
module_param ( erase_delay  ,
uint  ,
0400   
)
module_param ( output_cycle  ,
uint  ,
0400   
)
module_param ( input_cycle  ,
uint  ,
0400   
)
module_param ( bus_width  ,
uint  ,
0400   
)
module_param ( do_delays  ,
uint  ,
0400   
)
module_param ( log  ,
uint  ,
0400   
)
module_param ( dbg  ,
uint  ,
0400   
)
module_param ( badblocks  ,
charp  ,
0400   
)
module_param ( weakblocks  ,
charp  ,
0400   
)
module_param ( weakpages  ,
charp  ,
0400   
)
module_param ( bitflips  ,
uint  ,
0400   
)
module_param ( gravepages  ,
charp  ,
0400   
)
module_param ( rptwear  ,
uint  ,
0400   
)
module_param ( overridesize  ,
uint  ,
0400   
)
module_param ( cache_file  ,
charp  ,
0400   
)
module_param ( bbt  ,
uint  ,
0400   
)
module_param ( bch  ,
uint  ,
0400   
)
module_param_array ( parts  ,
ulong  ,
parts_num,
0400   
)
MODULE_PARM_DESC ( first_id_byte  ,
"The first byte returned by NAND Flash 'read ID' command (manufacturer ID)"   
)
MODULE_PARM_DESC ( second_id_byte  ,
"The second byte returned by NAND Flash 'read ID' command (chip ID)"   
)
MODULE_PARM_DESC ( third_id_byte  ,
"The third byte returned by NAND Flash 'read ID' command  
)
MODULE_PARM_DESC ( fourth_id_byte  ,
"The fourth byte returned by NAND Flash 'read ID' command  
)
MODULE_PARM_DESC ( access_delay  ,
"Initial page access delay (microseconds)"   
)
MODULE_PARM_DESC ( programm_delay  )
MODULE_PARM_DESC ( erase_delay  ,
"Sector erase delay (milliseconds)"   
)
MODULE_PARM_DESC ( output_cycle  ,
"Word output (from flash) time (nanoseconds)"   
)
MODULE_PARM_DESC ( input_cycle  ,
"Word input (to flash) time (nanoseconds)"   
)
MODULE_PARM_DESC ( bus_width  ,
"Chip's bus width (8- or 16-bit)"   
)
MODULE_PARM_DESC ( do_delays  ,
"Simulate NAND delays using busy-waits if not zero  
)
MODULE_PARM_DESC ( log  ,
"Perform logging if not zero  
)
MODULE_PARM_DESC ( dbg  ,
"Output debug information if not zero  
)
MODULE_PARM_DESC ( parts  ,
"Partition sizes (in erase blocks) separated by commas"   
)
MODULE_PARM_DESC ( badblocks  ,
"Erase blocks that are initially marked  bad,
separated by commas"   
)
MODULE_PARM_DESC ( weakblocks  ,
"Weak erase blocks "" separated by commas e.g. 113:2 means eb 113"" can be erased only twice before failing"  [:remaining erase cycles(defaults to 3)] 
)
MODULE_PARM_DESC ( weakpages  ,
"Weak pages "" separated by commas e.g. 1401:2 means page 1401"" can be written only twice before failing"  [:maximum writes(defaults to 3)] 
)
MODULE_PARM_DESC ( bitflips  ,
"Maximum number of random bit flips per page (zero by default)"   
)
MODULE_PARM_DESC ( gravepages  ,
"Pages that lose data "" separated by commas e.g. 1401:2 means page 1401"" can be read only twice before failing"  [:maximum reads(defaults to 3)] 
)
MODULE_PARM_DESC ( rptwear  ,
"Number of erases between reporting  wear,
if not zero  
)
MODULE_PARM_DESC ( overridesize  ,
"Specifies the NAND Flash size overriding the ID bytes. ""The size is specified in erase blocks and as the exponent of a power of two"" e.g. 5 means a size of 32 erase blocks"   
)
MODULE_PARM_DESC ( cache_file  ,
"File to use to cache nand pages instead of memory  
)
MODULE_PARM_DESC ( bbt  ,
"0  OOB,
1 BBT with marker in  OOB,
2 BBT with marker in data area"   
)
MODULE_PARM_DESC ( bch  ,
"Enable BCH ecc and set how many bits should ""be correctable in 512-byte blocks"   
)