aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 8b3ef4187219..2071b02f0526 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -166,6 +166,9 @@ typedef enum {
166 * for all large page devices, as they do not support 166 * for all large page devices, as they do not support
167 * autoincrement.*/ 167 * autoincrement.*/
168#define NAND_NO_READRDY 0x00000100 168#define NAND_NO_READRDY 0x00000100
169/* Chip does not allow subpage writes */
170#define NAND_NO_SUBPAGE_WRITE 0x00000200
171
169 172
170/* Options valid for Samsung large page devices */ 173/* Options valid for Samsung large page devices */
171#define NAND_SAMSUNG_LP_OPTIONS \ 174#define NAND_SAMSUNG_LP_OPTIONS \
@@ -193,6 +196,9 @@ typedef enum {
193/* Nand scan has allocated controller struct */ 196/* Nand scan has allocated controller struct */
194#define NAND_CONTROLLER_ALLOC 0x80000000 197#define NAND_CONTROLLER_ALLOC 0x80000000
195 198
199/* Cell info constants */
200#define NAND_CI_CHIPNR_MSK 0x03
201#define NAND_CI_CELLTYPE_MSK 0x0C
196 202
197/* 203/*
198 * nand_state_t - chip states 204 * nand_state_t - chip states
@@ -286,9 +292,7 @@ struct nand_ecc_ctrl {
286 * struct nand_buffers - buffer structure for read/write 292 * struct nand_buffers - buffer structure for read/write
287 * @ecccalc: buffer for calculated ecc 293 * @ecccalc: buffer for calculated ecc
288 * @ecccode: buffer for ecc read from flash 294 * @ecccode: buffer for ecc read from flash
289 * @oobwbuf: buffer for write oob data
290 * @databuf: buffer for data - dynamically sized 295 * @databuf: buffer for data - dynamically sized
291 * @oobrbuf: buffer to read oob data
292 * 296 *
293 * Do not change the order of buffers. databuf and oobrbuf must be in 297 * Do not change the order of buffers. databuf and oobrbuf must be in
294 * consecutive order. 298 * consecutive order.
@@ -296,9 +300,7 @@ struct nand_ecc_ctrl {
296struct nand_buffers { 300struct nand_buffers {
297 uint8_t ecccalc[NAND_MAX_OOBSIZE]; 301 uint8_t ecccalc[NAND_MAX_OOBSIZE];
298 uint8_t ecccode[NAND_MAX_OOBSIZE]; 302 uint8_t ecccode[NAND_MAX_OOBSIZE];
299 uint8_t oobwbuf[NAND_MAX_OOBSIZE]; 303 uint8_t databuf[NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE];
300 uint8_t databuf[NAND_MAX_PAGESIZE];
301 uint8_t oobrbuf[NAND_MAX_OOBSIZE];
302}; 304};
303 305
304/** 306/**
@@ -345,6 +347,7 @@ struct nand_buffers {
345 * @chipsize: [INTERN] the size of one chip for multichip arrays 347 * @chipsize: [INTERN] the size of one chip for multichip arrays
346 * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 348 * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1
347 * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf 349 * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf
350 * @subpagesize: [INTERN] holds the subpagesize
348 * @ecclayout: [REPLACEABLE] the default ecc placement scheme 351 * @ecclayout: [REPLACEABLE] the default ecc placement scheme
349 * @bbt: [INTERN] bad block table pointer 352 * @bbt: [INTERN] bad block table pointer
350 * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup 353 * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup
@@ -392,6 +395,8 @@ struct nand_chip {
392 unsigned long chipsize; 395 unsigned long chipsize;
393 int pagemask; 396 int pagemask;
394 int pagebuf; 397 int pagebuf;
398 int subpagesize;
399 uint8_t cellinfo;
395 int badblockpos; 400 int badblockpos;
396 401
397 nand_state_t state; 402 nand_state_t state;