mtd/drivers/mtd/nand Config.in,1.16,1.17 au1550nd.c,1.2,1.3

ppopov at infradead.org ppopov at infradead.org
Mon May 10 03:28:21 EDT 2004


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv31383/drivers/mtd/nand

Modified Files:
	Config.in au1550nd.c 
Log Message:
- Latest API bug fix: added the missing buffers to 1550nd driver
- added the 2.4 style config option.


Index: Config.in
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/Config.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Config.in	15 Apr 2004 14:24:09 -0000	1.16
+++ Config.in	10 May 2004 07:28:18 -0000	1.17
@@ -37,4 +37,8 @@
 if [ "$CONFIG_PPCHAMELEONEVB" = "y" ]; then
     dep_tristate '  NAND Flash device on PPChameleonEVB board' CONFIG_MTD_NAND_PPCHAMELEONEVB $CONFIG_MTD_NAND
 fi
+
+if [ "$CONFIG_SOC_AU1550" = "y" ]; then
+   dep_tristate '  NAND Flash Driver for Au1550 controller' CONFIG_MTD_NAND_AU1550 $CONFIG_MTD_NAND 
+fi
 endmenu

Index: au1550nd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/au1550nd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- au1550nd.c	27 Mar 2004 19:55:53 -0000	1.2
+++ au1550nd.c	10 May 2004 07:28:18 -0000	1.3
@@ -33,6 +33,10 @@
 static volatile u32 p_nand;
 static int nand_width;
 
+/* Internal buffers. Page buffer and oob buffer for one block*/
+static u_char data_buf[512 + 16];
+static u_char oob_buf[16 * 32];
+
 /*
  * Define partitions for flash device
  */
@@ -316,19 +320,14 @@
 	this->verify_buf = au1550_nand_verify_buf;
 	this->eccmode = NAND_ECC_SOFT;
 
+	/* Set internal data buffer */
+	this->data_buf = data_buf;
+	this->oob_buf = oob_buf;
+
 	/* Scan to find existence of the device */
 	if (nand_scan (au1550_mtd, 1)) {
 		kfree (au1550_mtd);
 		return -ENXIO;
-	}
-
-	/* Allocate memory for internal data buffer */
-	this->data_buf = kmalloc (sizeof(u_char) * (au1550_mtd->oobblock + 
-				au1550_mtd->oobsize), GFP_KERNEL);
-	if (!this->data_buf) {
-		printk ("Unable to allocate NAND data buffer for Pb1550.\n");
-		kfree (au1550_mtd);
-		return -ENOMEM;
 	}
 
 	/* Register the partitions */




More information about the linux-mtd-cvs mailing list