mtd/drivers/mtd/nand nand_base.c,1.97,1.98

gleixner at infradead.org gleixner at infradead.org
Mon Jun 7 15:56:51 EDT 2004


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

Modified Files:
	nand_base.c 
Log Message:
shift columns after checking the commands for seqin. Move it for lp devices too even if it does not hurt

Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- nand_base.c	4 Jun 2004 08:24:08 -0000	1.97
+++ nand_base.c	7 Jun 2004 19:56:48 -0000	1.98
@@ -494,10 +494,6 @@
 {
 	register struct nand_chip *this = mtd->priv;
 
-	/* Adjust columns for 16 bit buswidth */
-	if (this->options & NAND_BUSWIDTH_16)
-		column >>= 1;
-
 	/* Begin command latch cycle */
 	this->hwcontrol(mtd, NAND_CTL_SETCLE);
 	/*
@@ -528,8 +524,12 @@
 		this->hwcontrol(mtd, NAND_CTL_SETALE);
 
 		/* Serially input address */
-		if (column != -1)
+		if (column != -1) {
+			/* Adjust columns for 16 bit buswidth */
+			if (this->options & NAND_BUSWIDTH_16)
+				column >>= 1;
 			this->write_byte(mtd, column);
+		}
 		if (page_addr != -1) {
 			this->write_byte(mtd, (unsigned char) (page_addr & 0xff));
 			this->write_byte(mtd, (unsigned char) ((page_addr >> 8) & 0xff));
@@ -605,9 +605,6 @@
 		command = NAND_CMD_READ0;
 	}
 	
-	/* Adjust columns for 16 bit buswidth */
-	if (this->options & NAND_BUSWIDTH_16)
-		column >>= 1;
 		
 	/* Begin command latch cycle */
 	this->hwcontrol(mtd, NAND_CTL_SETCLE);
@@ -621,6 +618,9 @@
 
 		/* Serially input address */
 		if (column != -1) {
+			/* Adjust columns for 16 bit buswidth */
+			if (this->options & NAND_BUSWIDTH_16)
+				column >>= 1;
 			this->write_byte(mtd, column & 0xff);
 			this->write_byte(mtd, column >> 8);
 		}	





More information about the linux-mtd-cvs mailing list