mtd/include/linux/mtd nand.h,1.43,1.44 mtd.h,1.48,1.49

gleixner at infradead.org gleixner at infradead.org
Wed Apr 14 14:59:35 EDT 2004


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv15316

Modified Files:
	nand.h mtd.h 
Log Message:
large page nand support preliminaries

Index: nand.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/nand.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- nand.h	31 Mar 2004 07:21:31 -0000	1.43
+++ nand.h	14 Apr 2004 18:59:32 -0000	1.44
@@ -60,6 +60,12 @@
  */
 extern int nand_scan (struct mtd_info *mtd, int max_chips);
 
+/* This constant declares the max. oobsize / page, which
+ * is supported now. If you add a chip with bigger oobsize/page
+ * adjust this accordingly.
+ */
+#define NAND_MAX_OOBSIZE	64
+
 /*
  * Constants for hardware specific CLE/ALE/NCE function
 */
@@ -88,6 +94,14 @@
 
 /* Extended commands for large page devices */
 #define NAND_CMD_READSTART	0x30
+#define NAND_CMD_CACHEDPROG	0x15
+
+/* Status bits */
+#define NAND_STATUS_FAIL	0x01
+#define NAND_STATUS_FAIL_N1	0x02
+#define NAND_STATUS_TRUE_READY	0x20
+#define NAND_STATUS_READY	0x40
+#define NAND_STATUS_WP		0x80
 
 /* 
  * Constants for ECC_MODES
@@ -144,7 +158,8 @@
 	FL_READING,
 	FL_WRITING,
 	FL_ERASING,
-	FL_SYNCING
+	FL_SYNCING,
+	FL_CACHEDPRG,
 } nand_state_t;
 
 
@@ -214,18 +229,22 @@
 	void		(*enable_hwecc)(struct mtd_info *mtd, int mode);
 	int		eccmode;
 	int		eccsize;
+	int		eccsteps;
 	int 		chip_delay;
 	spinlock_t	chip_lock;
 	wait_queue_head_t wq;
 	nand_state_t 	state;
 	int 		page_shift;
 	u_char 		*data_buf;
+	u_char		*oob_buf;
+	int		oobdirty;
 	u_char		*data_poi;
 	unsigned int	options;
 	int		badblockpos;
 	int		numchips;
 	unsigned long	chipsize;
 	int		pagemask;
+	struct nand_oobinfo	*autooob;
 	void		*priv;
 };
 

Index: mtd.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/mtd.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- mtd.h	31 Mar 2004 07:43:43 -0000	1.48
+++ mtd.h	14 Apr 2004 18:59:33 -0000	1.49
@@ -105,7 +105,9 @@
 
 struct nand_oobinfo {
 	int	useecc;
-	int	eccpos[24];	
+	int	eccbytes;
+	int	eccpos[24];
+	int	oobfree[8][2];
 };
 
 
@@ -160,6 +162,7 @@
 
 	u_int32_t oobblock;  // Size of OOB blocks (e.g. 512)
 	u_int32_t oobsize;   // Amount of OOB data per block (e.g. 16)
+	u_int32_t oobavail;  // Number of bytes in OOB area available for fs 
 	u_int32_t ecctype;
 	u_int32_t eccsize;
 	




More information about the linux-mtd-cvs mailing list