mtd/drivers/mtd/devices Kconfig, 1.17, 1.18 blkmtd-24.c, 1.23, 1.24 blkmtd.c, 1.26, 1.27 block2mtd.c, 1.28, 1.29 doc2000.c, 1.66, 1.67 doc2001.c, 1.48, 1.49 doc2001plus.c, 1.13, 1.14 docecc.c, 1.6, 1.7 docprobe.c, 1.45, 1.46 lart.c, 1.8, 1.9 phram.c, 1.15, 1.16 pmc551.c, 1.31, 1.32 slram.c, 1.35, 1.36

gleixner at infradead.org gleixner at infradead.org
Mon Nov 7 06:15:40 EST 2005


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

Modified Files:
	Kconfig blkmtd-24.c blkmtd.c block2mtd.c doc2000.c doc2001.c 
	doc2001plus.c docecc.c docprobe.c lart.c phram.c pmc551.c 
	slram.c 
Log Message:
[MTD / JFFS2] Clean up trailing white spaces


Index: Kconfig
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/Kconfig,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Kconfig	13 May 2005 09:45:48 -0000	1.17
+++ Kconfig	7 Nov 2005 11:14:24 -0000	1.18
@@ -110,7 +110,7 @@
 	  If you have system RAM accessible by the CPU but not used by Linux
 	  in normal operation, you can give the physical address at which the
 	  available RAM starts, and the MTDRAM driver will use it instead of
-	  allocating space from Linux's available memory. Otherwise, leave 
+	  allocating space from Linux's available memory. Otherwise, leave
 	  this set to zero. Most people will want to leave this as zero.
 
 config RAMTD
@@ -174,7 +174,7 @@
 	select MTD_DOCPROBE
 	select MTD_NAND_IDS
 	---help---
-	  This provides an alternative MTD device driver for the M-Systems 
+	  This provides an alternative MTD device driver for the M-Systems
 	  DiskOnChip Millennium devices.  Use this if you have problems with
 	  the combined DiskOnChip 2000 and Millennium driver above.  To get
 	  the DiskOnChip probe code to load and use this driver instead of
@@ -201,7 +201,7 @@
 
 	  If you use this device, you probably also want to enable the INFTL
 	  'Inverse NAND Flash Translation Layer' option below, which is used
-	  to emulate a block device by using a kind of file system on the 
+	  to emulate a block device by using a kind of file system on the
 	  flash chips.
 
 	  NOTE: This driver will soon be replaced by the new DiskOnChip driver

Index: blkmtd-24.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd-24.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- blkmtd-24.c	9 Aug 2004 18:49:42 -0000	1.23
+++ blkmtd-24.c	7 Nov 2005 11:14:24 -0000	1.24
@@ -139,7 +139,7 @@
 	iobuf->length = 0;
 	iobuf->offset = 0;
 	iobuf->locked = 1;
-	
+
 	for(cnt = 0; cnt < pages; cnt++) {
 		page = grab_cache_page(dev->binding->bd_inode->i_mapping, pagenrs[cnt]);
 		pagelst[cnt] = page;
@@ -300,7 +300,7 @@
 			commit_pages(dev);
 		}
 	}
-	
+
 	if(readpages) {
 		err = read_pages(dev, pagenrs, pagelst, readpages);
 		if(err < 0)
@@ -690,7 +690,7 @@
 		}
 		if(dev->wr_buf) {
 			dev->wr_buf->locked = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4)			
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4)
 			if(dev->wr_buf->blocks)
 				kfree(dev->rw_buf->blocks);
 #endif
@@ -850,7 +850,7 @@
 		goto devinit_err;
 	}
 #endif
-	
+
 	if(!readonly) {
 		if(alloc_kiovec(1, &dev->wr_buf)) {
 			err("cant allocate kiobuf - readonly enabled");
@@ -924,7 +924,7 @@
 		     dev->mtd_info.erasesize >> 10,
 		     (dev->wr_buf) ? "" : "(read-only)");
 	}
-	
+
 	return dev;
 
  devinit_err:

Index: blkmtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- blkmtd.c	18 Mar 2005 01:37:31 -0000	1.26
+++ blkmtd.c	7 Nov 2005 11:14:24 -0000	1.27
@@ -117,7 +117,7 @@
 		unlock_page(page);
 		page_cache_release(page);
 	} while (bvec >= bio->bi_io_vec);
-	
+
 	complete((struct completion*)bio->bi_private);
 	return 0;
 }
@@ -135,7 +135,7 @@
 		unlock_page(page);
 		return 0;
 	}
-	
+
 	ClearPageUptodate(page);
 	ClearPageError(page);
 
@@ -710,7 +710,7 @@
 		     dev->mtd_info.erasesize >> 10,
 		     readonly ? "(read-only)" : "");
 	}
-	
+
 	return dev;
 
  devinit_err:

Index: block2mtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/block2mtd.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- block2mtd.c	19 Mar 2005 22:40:44 -0000	1.28
+++ block2mtd.c	7 Nov 2005 11:14:24 -0000	1.29
@@ -111,7 +111,7 @@
 			return PTR_ERR(page);
 
 		max = (u_long*)page_address(page) + PAGE_SIZE;
-		for (p=(u_long*)page_address(page); p<max; p++) 
+		for (p=(u_long*)page_address(page); p<max; p++)
 			if (*p != -1UL) {
 				lock_page(page);
 				memset(page_address(page), 0xff, PAGE_SIZE);
@@ -206,7 +206,7 @@
 	if (retlen)
 		*retlen = 0;
 	while (len) {
-		if ((offset+len) > PAGE_SIZE) 
+		if ((offset+len) > PAGE_SIZE)
 			cpylen = PAGE_SIZE - offset;	// multiple pages
 		else
 			cpylen = len;			// this page

Index: doc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2000.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- doc2000.c	5 Jan 2005 18:05:12 -0000	1.66
+++ doc2000.c	7 Nov 2005 11:14:24 -0000	1.67
@@ -58,7 +58,7 @@
 			size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel);
 static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
 			 size_t *retlen, const u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel);
-static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, 
+static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
 			  unsigned long count, loff_t to, size_t *retlen,
 			  u_char *eccbuf, struct nand_oobinfo *oobsel);
 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
@@ -76,14 +76,14 @@
 {
 	volatile char dummy;
 	int i;
-	
+
 	for (i = 0; i < cycles; i++) {
 		if (DoC_is_Millennium(doc))
 			dummy = ReadDOC(doc->virtadr, NOP);
 		else
 			dummy = ReadDOC(doc->virtadr, DOCStatus);
 	}
-	
+
 }
 
 /* DOC_WaitReady: Wait for RDY line to be asserted by the flash chip */
@@ -220,8 +220,8 @@
 		WriteDOC(ofs & 0xff, docptr, WritePipeTerm);
 
 	DoC_Delay(doc, 2);	/* Needed for some slow flash chips. mf. */
-	
-	/* FIXME: The SlowIO's for millennium could be replaced by 
+
+	/* FIXME: The SlowIO's for millennium could be replaced by
 	   a single WritePipeTerm here. mf. */
 
 	/* Lower the ALE line */
@@ -377,9 +377,9 @@
 	if (mfr == 0xff || mfr == 0)
 		return 0;
 
-	/* Check it's the same as the first chip we identified. 
+	/* Check it's the same as the first chip we identified.
 	 * M-Systems say that any given DiskOnChip device should only
-	 * contain _one_ type of flash part, although that's not a 
+	 * contain _one_ type of flash part, although that's not a
 	 * hardware restriction. */
 	if (doc->mfr) {
 		if (doc->mfr == mfr && doc->id == id)
@@ -397,7 +397,7 @@
 			for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
 				if (nand_manuf_ids[j].id == mfr)
 					break;
-			}	
+			}
 			printk(KERN_INFO
 			       "Flash chip found: Manufacturer ID: %2.2X, "
 			       "Chip ID: %2.2X (%s:%s)\n", mfr, id,
@@ -405,7 +405,7 @@
 			if (!doc->mfr) {
 				doc->mfr = mfr;
 				doc->id = id;
-				doc->chipshift = 
+				doc->chipshift =
 					ffs((nand_flash_ids[i].chipsize << 20)) - 1;
 				doc->page256 = (nand_flash_ids[i].pagesize == 256) ? 1 : 0;
 				doc->pageadrlen = doc->chipshift > 25 ? 3 : 2;
@@ -467,7 +467,7 @@
 
 	ret = 0;
 
-	/* Fill out the chip array with {floor, chipno} for each 
+	/* Fill out the chip array with {floor, chipno} for each
 	 * detected chip in the device. */
 	for (floor = 0; floor < MAX_FLOORS; floor++) {
 		for (chip = 0; chip < numchips[floor]; chip++) {
@@ -757,12 +757,12 @@
 				     (long)from, eccbuf[0], eccbuf[1], eccbuf[2],
 				     eccbuf[3], eccbuf[4], eccbuf[5]);
 #endif
-		
+
 			/* disable the ECC engine */
 			WriteDOC(DOC_ECC_DIS, docptr , ECCConf);
 		}
 
-		/* according to 11.4.1, we need to wait for the busy line 
+		/* according to 11.4.1, we need to wait for the busy line
 	         * drop if we read to the end of the page.  */
 		if(0 == ((from + len) & 0x1ff))
 		{
@@ -941,7 +941,7 @@
 
 		/* Let the caller know we completed it */
 		*retlen += len;
-		
+
 		if (eccbuf) {
 			unsigned char x[8];
 			size_t dummy;
@@ -950,10 +950,10 @@
 			/* Write the ECC data to flash */
 			for (di=0; di<6; di++)
 				x[di] = eccbuf[di];
-		
+
 			x[6]=0x55;
 			x[7]=0x55;
-		
+
 			ret = doc_write_oob_nolock(mtd, to, 8, &dummy, x);
 			if (ret) {
 				up(&this->lock);
@@ -970,7 +970,7 @@
 	return 0;
 }
 
-static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, 
+static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
 			  unsigned long count, loff_t to, size_t *retlen,
 			  u_char *eccbuf, struct nand_oobinfo *oobsel)
 {
@@ -1022,7 +1022,7 @@
 			break;
 
 		to += thislen;
-	}		
+	}
 
 	up(&writev_buf_sem);
 	*retlen = totretlen;
@@ -1080,7 +1080,7 @@
 	/* Reading the full OOB data drops us off of the end of the page,
          * causing the flash device to go into busy mode, so we need
          * to wait until ready 11.4.1 and Toshiba TC58256FT docs */
-	
+
 	ret = DoC_WaitReady(this);
 
 	up(&this->lock);
@@ -1190,7 +1190,7 @@
 	return 0;
 
 }
- 
+
 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
  			 size_t * retlen, const u_char * buf)
 {
@@ -1222,7 +1222,7 @@
 	}
 
 	instr->state = MTD_ERASING;
-		
+
 	/* FIXME: Do this in the background. Use timers or schedule_task() */
 	while(len) {
 		mychip = &this->chips[ofs >> this->chipshift];

Index: doc2001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- doc2001.c	5 Jan 2005 18:05:12 -0000	1.48
+++ doc2001.c	7 Nov 2005 11:14:24 -0000	1.49
@@ -196,10 +196,10 @@
 	DoC_Command(doc->virtadr, NAND_CMD_RESET, CDSN_CTRL_WP);
 	DoC_WaitReady(doc->virtadr);
 
-	/* Read the NAND chip ID: 1. Send ReadID command */ 
+	/* Read the NAND chip ID: 1. Send ReadID command */
 	DoC_Command(doc->virtadr, NAND_CMD_READID, CDSN_CTRL_WP);
 
-	/* Read the NAND chip ID: 2. Send address byte zero */ 
+	/* Read the NAND chip ID: 2. Send address byte zero */
 	DoC_Address(doc->virtadr, 1, 0x00, CDSN_CTRL_WP, 0x00);
 
 	/* Read the manufacturer and device id codes of the flash device through
@@ -223,7 +223,7 @@
 			for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
 				if (nand_manuf_ids[j].id == mfr)
 					break;
-			}	
+			}
 			printk(KERN_INFO "Flash chip found: Manufacturer ID: %2.2X, "
 			       "Chip ID: %2.2X (%s:%s)\n",
 			       mfr, id, nand_manuf_ids[j].name, nand_flash_ids[i].name);
@@ -275,7 +275,7 @@
 		return;
 	}
 
-	/* Fill out the chip array with {floor, chipno} for each 
+	/* Fill out the chip array with {floor, chipno} for each
 	 * detected chip in the device. */
 	for (floor = 0, ret = 0; floor < MAX_FLOORS_MIL; floor++) {
 		for (chip = 0 ; chip < numchips[floor] ; chip++) {
@@ -309,7 +309,7 @@
 	tmp2 = ReadDOC(doc2->virtadr, AliasResolution);
 	if (tmp1 != tmp2)
 		return 0;
-	
+
 	WriteDOC((tmp1+1) % 0xff, doc1->virtadr, AliasResolution);
 	tmp2 = ReadDOC(doc2->virtadr, AliasResolution);
 	if (tmp2 == (tmp1+1) % 0xff)
@@ -425,7 +425,7 @@
 		return -EINVAL;
 
 	/* Don't allow a single read to cross a 512-byte block boundary */
-	if (from + len > ((from | 0x1ff) + 1)) 
+	if (from + len > ((from | 0x1ff) + 1))
 		len = ((from | 0x1ff) + 1) - from;
 
 	/* Find the chip which is to be used and select it */
@@ -552,7 +552,7 @@
 
 #if 0
 	/* Don't allow a single write to cross a 512-byte block boundary */
-	if (to + len > ( (to | 0x1ff) + 1)) 
+	if (to + len > ( (to | 0x1ff) + 1))
 		len = ((to | 0x1ff) + 1) - to;
 #else
 	/* Don't allow writes which aren't exactly one block */
@@ -632,7 +632,7 @@
 
 		/* write the block status BLOCK_USED (0x5555) at the end of ECC data
 		   FIXME: this is only a hack for programming the IPL area for LinuxBIOS
-		   and should be replace with proper codes in user space utilities */ 
+		   and should be replace with proper codes in user space utilities */
 		WriteDOC(0x55, docptr, Mil_CDSN_IO);
 		WriteDOC(0x55, docptr, Mil_CDSN_IO + 1);
 
@@ -802,7 +802,7 @@
 	void __iomem *docptr = this->virtadr;
 	struct Nand *mychip = &this->chips[ofs >> this->chipshift];
 
-	if (len != mtd->erasesize) 
+	if (len != mtd->erasesize)
 		printk(KERN_WARNING "Erase not right size (%x != %x)n",
 		       len, mtd->erasesize);
 
@@ -870,9 +870,9 @@
 	while ((mtd=docmillist)) {
 		this = mtd->priv;
 		docmillist = this->nextdoc;
-			
+
 		del_mtd_device(mtd);
-			
+
 		iounmap(this->virtadr);
 		kfree(this->chips);
 		kfree(mtd);

Index: doc2001plus.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001plus.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- doc2001plus.c	5 Jan 2005 18:05:12 -0000	1.13
+++ doc2001plus.c	7 Nov 2005 11:14:24 -0000	1.14
@@ -293,10 +293,10 @@
 	DoC_Command(docptr, NAND_CMD_RESET, 0);
 	DoC_WaitReady(docptr);
 
-	/* Read the NAND chip ID: 1. Send ReadID command */ 
+	/* Read the NAND chip ID: 1. Send ReadID command */
 	DoC_Command(docptr, NAND_CMD_READID, 0);
 
-	/* Read the NAND chip ID: 2. Send address byte zero */ 
+	/* Read the NAND chip ID: 2. Send address byte zero */
 	DoC_Address(doc, 1, 0x00, 0, 0x00);
 
 	WriteDOC(0, docptr, Mplus_FlashControl);
@@ -365,7 +365,7 @@
 		this->interleave = 1;
 
 	/* Check the ASIC agrees */
-	if ( (this->interleave << 2) != 
+	if ( (this->interleave << 2) !=
 	     (ReadDOC(this->virtadr, Mplus_Configuration) & 4)) {
 		u_char conf = ReadDOC(this->virtadr, Mplus_Configuration);
 		printk(KERN_NOTICE "Setting DiskOnChip Millennium Plus interleave to %s\n",
@@ -398,7 +398,7 @@
 		return;
 	}
 
-	/* Fill out the chip array with {floor, chipno} for each 
+	/* Fill out the chip array with {floor, chipno} for each
 	 * detected chip in the device. */
 	for (floor = 0, ret = 0; floor < MAX_FLOORS_MPLUS; floor++) {
 		for (chip = 0 ; chip < numchips[floor] ; chip++) {
@@ -432,7 +432,7 @@
 	tmp2 = ReadDOC(doc2->virtadr, Mplus_AliasResolution);
 	if (tmp1 != tmp2)
 		return 0;
-	
+
 	WriteDOC((tmp1+1) % 0xff, doc1->virtadr, Mplus_AliasResolution);
 	tmp2 = ReadDOC(doc2->virtadr, Mplus_AliasResolution);
 	if (tmp2 == (tmp1+1) % 0xff)
@@ -624,7 +624,7 @@
 		return -EINVAL;
 
 	/* Don't allow a single read to cross a 512-byte block boundary */
-	if (from + len > ((from | 0x1ff) + 1)) 
+	if (from + len > ((from | 0x1ff) + 1))
 		len = ((from | 0x1ff) + 1) - from;
 
 	DoC_CheckASIC(docptr);
@@ -1066,7 +1066,7 @@
 
 	DoC_CheckASIC(docptr);
 
-	if (len != mtd->erasesize) 
+	if (len != mtd->erasesize)
 		printk(KERN_WARNING "MTD: Erase not right size (%x != %x)n",
 		       len, mtd->erasesize);
 
@@ -1136,9 +1136,9 @@
 	while ((mtd=docmilpluslist)) {
 		this = mtd->priv;
 		docmilpluslist = this->nextdoc;
-			
+
 		del_mtd_device(mtd);
-			
+
 		iounmap(this->virtadr);
 		kfree(this->chips);
 		kfree(mtd);

Index: docecc.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/docecc.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- docecc.c	6 Nov 2005 10:37:05 -0000	1.6
+++ docecc.c	7 Nov 2005 11:14:25 -0000	1.7
@@ -4,7 +4,7 @@
  * GNU GPL License. The rest is simply to convert the disk on chip
  * syndrom into a standard syndom.
  *
- * Author: Fabrice Bellard (fabrice.bellard at netgem.com) 
+ * Author: Fabrice Bellard (fabrice.bellard at netgem.com)
  * Copyright (C) 2000 Netgem S.A.
  *
  * $Id$
@@ -122,7 +122,7 @@
         a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1)
    we consider the integer "i" whose binary representation with a(0) being LSB
    and a(m-1) MSB is (a(0),a(1),...,a(m-1)) and locate the entry
-   "index_of[i]". Now, @^index_of[i] is that element whose polynomial 
+   "index_of[i]". Now, @^index_of[i] is that element whose polynomial
     representation is (a(0),a(1),a(2),...,a(m-1)).
    NOTE:
         The element alpha_to[2^m-1] = 0 always signifying that the
@@ -130,7 +130,7 @@
         Similarily, the element index_of[0] = A0 always signifying
    that the power of alpha which has the polynomial representation
    (0,0,...,0) is "infinity".
- 
+
 */
 
 static void
@@ -176,7 +176,7 @@
  * are written back. NOTE! This array must be at least NN-KK elements long.
  * The corrected data are written in eras_val[]. They must be xor with the data
  * to retrieve the correct data : data[erase_pos[i]] ^= erase_val[i] .
- * 
+ *
  * First "no_eras" erasures are declared by the calling program. Then, the
  * maximum # of errors correctable is t_after_eras = floor((NN-KK-no_eras)/2).
  * If the number of channel errors is not greater than "t_after_eras" the
@@ -189,7 +189,7 @@
  * */
 static int
 eras_dec_rs(dtype Alpha_to[NN + 1], dtype Index_of[NN + 1],
-            gf bb[NN - KK + 1], gf eras_val[NN-KK], int eras_pos[NN-KK], 
+            gf bb[NN - KK + 1], gf eras_val[NN-KK], int eras_pos[NN-KK],
             int no_eras)
 {
   int deg_lambda, el, deg_omega;
@@ -212,7 +212,7 @@
     count = 0;
     goto finish;
   }
-  
+
   for(i=1;i<=NN-KK;i++){
     s[i] = bb[0];
   }
@@ -220,7 +220,7 @@
     if(bb[j] == 0)
       continue;
     tmp = Index_of[bb[j]];
-    
+
     for(i=1;i<=NN-KK;i++)
       s[i] ^= Alpha_to[modnn(tmp + (B0+i-1)*PRIM*j)];
   }
@@ -234,7 +234,7 @@
           tmp = modnn(tmp + 2 * KK * (B0+i-1)*PRIM);
       s[i] = tmp;
   }
-  
+
   CLEAR(&lambda[1],NN-KK);
   lambda[0] = 1;
 
@@ -252,7 +252,7 @@
 #if DEBUG_ECC >= 1
     /* Test code that verifies the erasure locator polynomial just constructed
        Needed only for decoder debugging. */
-    
+
     /* find roots of the erasure location polynomial */
     for(i=1;i<=no_eras;i++)
       reg[i] = Index_of[lambda[i]];
@@ -286,7 +286,7 @@
   }
   for(i=0;i<NN-KK+1;i++)
     b[i] = Index_of[lambda[i]];
-  
+
   /*
    * Begin Berlekamp-Massey algorithm to determine error+erasure
    * locator polynomial
@@ -389,7 +389,7 @@
     omega[i] = Index_of[tmp];
   }
   omega[NN-KK] = A0;
-  
+
   /*
    * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 =
    * inv(X(l))**(B0-1) and den = lambda_pr(inv(X(l))) all in poly-form
@@ -402,7 +402,7 @@
     }
     num2 = Alpha_to[modnn(root[j] * (B0 - 1) + NN)];
     den = 0;
-    
+
     /* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */
     for (i = min(deg_lambda,NN-KK-1) & ~1; i >= 0; i -=2) {
       if(lambda[i+1] != A0)
@@ -436,11 +436,11 @@
 /* The sector bytes are packed into NB_DATA MM bits words */
 #define NB_DATA (((SECTOR_SIZE + 1) * 8 + 6) / MM)
 
-/* 
+/*
  * Correct the errors in 'sector[]' by using 'ecc1[]' which is the
  * content of the feedback shift register applyied to the sector and
  * the ECC. Return the number of errors corrected (and correct them in
- * sector), or -1 if error 
+ * sector), or -1 if error
  */
 int doc_decode_ecc(unsigned char sector[SECTOR_SIZE], unsigned char ecc1[6])
 {
@@ -454,7 +454,7 @@
     Alpha_to = kmalloc((NN + 1) * sizeof(dtype), GFP_KERNEL);
     if (!Alpha_to)
         return -1;
-    
+
     Index_of = kmalloc((NN + 1) * sizeof(dtype), GFP_KERNEL);
     if (!Index_of) {
         kfree(Alpha_to);
@@ -470,7 +470,7 @@
     bb[2] = ((ecc1[2] & 0xf0) >> 4) | ((ecc1[3] & 0x3f) << 4);
     bb[3] = ((ecc1[3] & 0xc0) >> 6) | ((ecc1[0] & 0xff) << 2);
 
-    nb_errors = eras_dec_rs(Alpha_to, Index_of, bb, 
+    nb_errors = eras_dec_rs(Alpha_to, Index_of, bb,
                             error_val, error_pos, 0);
     if (nb_errors <= 0)
         goto the_end;
@@ -489,7 +489,7 @@
                can be modified since pos is even */
             index = (pos >> 3) ^ 1;
             bitpos = pos & 7;
-            if ((index >= 0 && index < SECTOR_SIZE) || 
+            if ((index >= 0 && index < SECTOR_SIZE) ||
                 index == (SECTOR_SIZE + 1)) {
                 val = error_val[i] >> (2 + bitpos);
                 parity ^= val;
@@ -500,7 +500,7 @@
             bitpos = (bitpos + 10) & 7;
             if (bitpos == 0)
                 bitpos = 8;
-            if ((index >= 0 && index < SECTOR_SIZE) || 
+            if ((index >= 0 && index < SECTOR_SIZE) ||
                 index == (SECTOR_SIZE + 1)) {
                 val = error_val[i] << (8 - bitpos);
                 parity ^= val;
@@ -509,7 +509,7 @@
             }
         }
     }
-    
+
     /* use parity to test extra errors */
     if ((parity & 0xff) != 0)
         nb_errors = -1;

Index: docprobe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/docprobe.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- docprobe.c	17 Mar 2005 19:44:27 -0000	1.45
+++ docprobe.c	7 Nov 2005 11:14:25 -0000	1.46
@@ -9,17 +9,17 @@
 
 
 /* DOC_PASSIVE_PROBE:
-   In order to ensure that the BIOS checksum is correct at boot time, and 
-   hence that the onboard BIOS extension gets executed, the DiskOnChip 
-   goes into reset mode when it is read sequentially: all registers 
-   return 0xff until the chip is woken up again by writing to the 
-   DOCControl register. 
-
-   Unfortunately, this means that the probe for the DiskOnChip is unsafe, 
-   because one of the first things it does is write to where it thinks 
-   the DOCControl register should be - which may well be shared memory 
-   for another device. I've had machines which lock up when this is 
-   attempted. Hence the possibility to do a passive probe, which will fail 
+   In order to ensure that the BIOS checksum is correct at boot time, and
+   hence that the onboard BIOS extension gets executed, the DiskOnChip
+   goes into reset mode when it is read sequentially: all registers
+   return 0xff until the chip is woken up again by writing to the
+   DOCControl register.
+
+   Unfortunately, this means that the probe for the DiskOnChip is unsafe,
+   because one of the first things it does is write to where it thinks
+   the DOCControl register should be - which may well be shared memory
+   for another device. I've had machines which lock up when this is
+   attempted. Hence the possibility to do a passive probe, which will fail
    to detect a chip in reset mode, but is at least guaranteed not to lock
    the machine.
 
@@ -33,9 +33,9 @@
 
    The old Millennium-only driver has been retained just in case there
    are problems with the new code. If the combined driver doesn't work
-   for you, you can try the old one by undefining DOC_SINGLE_DRIVER 
+   for you, you can try the old one by undefining DOC_SINGLE_DRIVER
    below and also enabling it in your configuration. If this fixes the
-   problems, please send a report to the MTD mailing list at 
+   problems, please send a report to the MTD mailing list at
    <linux-mtd at lists.infradead.org>.
 */
 #define DOC_SINGLE_DRIVER
@@ -68,16 +68,16 @@
 static unsigned long __initdata doc_locations[] = {
 #if defined (__alpha__) || defined(__i386__) || defined(__x86_64__)
 #ifdef CONFIG_MTD_DOCPROBE_HIGH
-	0xfffc8000, 0xfffca000, 0xfffcc000, 0xfffce000, 
+	0xfffc8000, 0xfffca000, 0xfffcc000, 0xfffce000,
 	0xfffd0000, 0xfffd2000, 0xfffd4000, 0xfffd6000,
-	0xfffd8000, 0xfffda000, 0xfffdc000, 0xfffde000, 
-	0xfffe0000, 0xfffe2000, 0xfffe4000, 0xfffe6000, 
+	0xfffd8000, 0xfffda000, 0xfffdc000, 0xfffde000,
+	0xfffe0000, 0xfffe2000, 0xfffe4000, 0xfffe6000,
 	0xfffe8000, 0xfffea000, 0xfffec000, 0xfffee000,
 #else /*  CONFIG_MTD_DOCPROBE_HIGH */
-	0xc8000, 0xca000, 0xcc000, 0xce000, 
+	0xc8000, 0xca000, 0xcc000, 0xce000,
 	0xd0000, 0xd2000, 0xd4000, 0xd6000,
-	0xd8000, 0xda000, 0xdc000, 0xde000, 
-	0xe0000, 0xe2000, 0xe4000, 0xe6000, 
+	0xd8000, 0xda000, 0xdc000, 0xde000,
+	0xe0000, 0xe2000, 0xe4000, 0xe6000,
 	0xe8000, 0xea000, 0xec000, 0xee000,
 #endif /*  CONFIG_MTD_DOCPROBE_HIGH */
 #elif defined(__PPC__)
@@ -111,35 +111,35 @@
 		return 0;
 #endif /* CONFIG_MTD_DOCPROBE_55AA */
 
-#ifndef DOC_PASSIVE_PROBE	
+#ifndef DOC_PASSIVE_PROBE
 	/* It's not possible to cleanly detect the DiskOnChip - the
 	 * bootup procedure will put the device into reset mode, and
 	 * it's not possible to talk to it without actually writing
 	 * to the DOCControl register. So we store the current contents
 	 * of the DOCControl register's location, in case we later decide
 	 * that it's not a DiskOnChip, and want to put it back how we
-	 * found it. 
+	 * found it.
 	 */
 	tmp2 = ReadDOC(window, DOCControl);
-	
+
 	/* Reset the DiskOnChip ASIC */
-	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET, 
+	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET,
 		 window, DOCControl);
-	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET, 
+	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_RESET,
 		 window, DOCControl);
-	
+
 	/* Enable the DiskOnChip ASIC */
-	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL, 
+	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL,
 		 window, DOCControl);
-	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL, 
+	WriteDOC(DOC_MODE_CLR_ERR | DOC_MODE_MDWREN | DOC_MODE_NORMAL,
 		 window, DOCControl);
-#endif /* !DOC_PASSIVE_PROBE */	
+#endif /* !DOC_PASSIVE_PROBE */
 
 	/* We need to read the ChipID register four times. For some
 	   newer DiskOnChip 2000 units, the first three reads will
 	   return the DiskOnChip Millennium ident. Don't ask. */
 	ChipID = ReadDOC(window, ChipID);
-  
+
 	switch (ChipID) {
 	case DOC_ChipID_Doc2k:
 		/* Check the TOGGLE bit in the ECC register */
@@ -149,7 +149,7 @@
 		if (tmp != tmpb && tmp == tmpc)
 				return ChipID;
 		break;
-		
+
 	case DOC_ChipID_DocMil:
 		/* Check for the new 2000 with Millennium ASIC */
 		ReadDOC(window, ChipID);
@@ -164,7 +164,7 @@
 		if (tmp != tmpb && tmp == tmpc)
 				return ChipID;
 		break;
-		
+
 	case DOC_ChipID_DocMilPlus16:
 	case DOC_ChipID_DocMilPlus32:
 	case 0:
@@ -179,7 +179,7 @@
 			DOC_MODE_BDECT;
 		WriteDOC(tmp, window, Mplus_DOCControl);
 		WriteDOC(~tmp, window, Mplus_CtrlConfirm);
-	
+
 		mdelay(1);
 		/* Enable the DiskOnChip ASIC */
 		tmp = DOC_MODE_NORMAL | DOC_MODE_MDWREN | DOC_MODE_RST_LAT |
@@ -187,7 +187,7 @@
 		WriteDOC(tmp, window, Mplus_DOCControl);
 		WriteDOC(~tmp, window, Mplus_CtrlConfirm);
 		mdelay(1);
-#endif /* !DOC_PASSIVE_PROBE */	
+#endif /* !DOC_PASSIVE_PROBE */
 
 		ChipID = ReadDOC(window, ChipID);
 
@@ -227,7 +227,7 @@
 	WriteDOC(tmp2, window, DOCControl);
 #endif
 	return 0;
-}   
+}
 
 static int docfound;
 
@@ -244,10 +244,10 @@
 	void (*initroutine)(struct mtd_info *) = NULL;
 
 	docptr = ioremap(physadr, DOC_IOREMAP_LEN);
-	
+
 	if (!docptr)
 		return;
-	
+
 	if ((ChipID = doccheck(docptr, physadr))) {
 		if (ChipID == DOC_ChipID_Doc2kTSOP) {
 			/* Remove this at your own peril. The hardware driver works but nothing prevents you from erasing bad blocks */
@@ -263,9 +263,9 @@
 			iounmap(docptr);
 			return;
 		}
-		
+
 		this = (struct DiskOnChip *)(&mtd[1]);
-		
+
 		memset((char *)mtd,0, sizeof(struct mtd_info));
 		memset((char *)this, 0, sizeof(struct DiskOnChip));
 
@@ -281,13 +281,13 @@
 			im_funcname = "DoC2k_init";
 			im_modname = "doc2000";
 			break;
-			
+
 		case DOC_ChipID_Doc2k:
 			name="2000";
 			im_funcname = "DoC2k_init";
 			im_modname = "doc2000";
 			break;
-			
+
 		case DOC_ChipID_DocMil:
 			name="Millennium";
 #ifdef DOC_SINGLE_DRIVER
@@ -331,7 +331,7 @@
 static int __init init_doc(void)
 {
 	int i;
-	
+
 	if (doc_config_location) {
 		printk(KERN_INFO "Using configured DiskOnChip probe address 0x%lx\n", doc_config_location);
 		DoC_Probe(doc_config_location);

Index: lart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/lart.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- lart.c	6 Nov 2005 11:15:50 -0000	1.8
+++ lart.c	7 Nov 2005 11:14:25 -0000	1.9
@@ -122,7 +122,7 @@
 
 /*
  * The data line mapping on LART is as follows:
- * 
+ *
  *   	 U2  CPU |   U3  CPU
  *   	 -------------------
  *   	  0  20  |   0   12
@@ -181,7 +181,7 @@
 		(((x) & 0x00004000) >> 13)		\
 	)
 
-/* 
+/*
  * The address line mapping on LART is as follows:
  *
  *   	 U3  CPU |   U2  CPU
@@ -204,7 +204,7 @@
  *   	 12  15  |   12  15
  *   	 13  14  |   13  14
  *   	 14  16  |   14  16
- * 
+ *
  *   	 MAIN BLOCK BOUNDARY
  *
  *   	 15  17  |   15  18

Index: phram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/phram.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- phram.c	6 Nov 2005 11:15:50 -0000	1.15
+++ phram.c	7 Nov 2005 11:14:25 -0000	1.16
@@ -41,10 +41,10 @@
 
 	if (instr->addr + instr->len > mtd->size)
 		return -EINVAL;
-	
+
 	memset(start + instr->addr, 0xff, instr->len);
 
-	/* This'll catch a few races. Free the thing before returning :) 
+	/* This'll catch a few races. Free the thing before returning :)
 	 * I don't feel at all ashamed. This kind of thing is possible anyway
 	 * with flash, but unlikely.
 	 */
@@ -63,7 +63,7 @@
 
 	if (from + len > mtd->size)
 		return -EINVAL;
-	
+
 	*mtdbuf = start + from;
 	*retlen = len;
 	return 0;
@@ -84,7 +84,7 @@
 
 	if (len > mtd->size - from)
 		len = mtd->size - from;
-	
+
 	memcpy(buf, start + from, len);
 
 	*retlen = len;
@@ -101,7 +101,7 @@
 
 	if (len > mtd->size - to)
 		len = mtd->size - to;
-	
+
 	memcpy(start + to, buf, len);
 
 	*retlen = len;
@@ -159,7 +159,7 @@
 	}
 
 	list_add_tail(&new->list, &phram_list);
-	return 0;	
+	return 0;
 
 out2:
 	iounmap(new->mtd.priv);

Index: pmc551.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/pmc551.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- pmc551.c	17 Mar 2005 19:44:27 -0000	1.31
+++ pmc551.c	7 Nov 2005 11:14:25 -0000	1.32
@@ -27,7 +27,7 @@
  *	 it as high speed swap or for a high speed disk device of some
  *	 sort.  Which becomes very useful on diskless systems in the
  *	 embedded market I might add.
- *	 
+ *
  * Notes:
  *	 Due to what I assume is more buggy SROM, the 64M PMC551 I
  *	 have available claims that all 4 of it's DRAM banks have 64M
@@ -63,10 +63,10 @@
  *       Minyard set up the card to utilize a 1M sliding apature.
  *
  *	 Corey Minyard <minyard at nortelnetworks.com>
- *       * Modified driver to utilize a sliding aperture instead of 
+ *       * Modified driver to utilize a sliding aperture instead of
  *         mapping all memory into kernel space which turned out to
  *         be very wasteful.
- *       * Located a bug in the SROM's initialization sequence that 
+ *       * Located a bug in the SROM's initialization sequence that
  *         made the memory unusable, added a fix to code to touch up
  *         the DRAM some.
  *
@@ -390,7 +390,7 @@
 	bcmd |= (0x40|0x20);
 	pci_write_config_byte(dev, PMC551_SYS_CTRL_REG, bcmd);
 
-        /* 
+        /*
 	 * Take care and turn off the memory on the device while we
 	 * tweak the configurations
 	 */
@@ -408,7 +408,7 @@
 	 * Grab old BAR0 config so that we can figure out memory size
 	 * This is another bit of kludge going on.  The reason for the
 	 * redundancy is I am hoping to retain the original configuration
-	 * previously assigned to the card by the BIOS or some previous 
+	 * previously assigned to the card by the BIOS or some previous
 	 * fixup routine in the kernel.  So we read the old config into cfg,
 	 * then write all 1's to the memory space, read back the result into
 	 * "size", and then write back all the old config.
@@ -480,7 +480,7 @@
         } while ( (PCI_COMMAND_IO) & cmd );
 
         /*
-	 * Turn on auto refresh 
+	 * Turn on auto refresh
 	 * The loop is taken directly from Ramix's example code.  I assume that
 	 * this must be held high for some duration of time, but I can find no
 	 * documentation refrencing the reasons why.
@@ -615,7 +615,7 @@
 	pci_read_config_byte(dev, PMC551_SYS_CTRL_REG, &bcmd );
 	printk( KERN_DEBUG "pmc551: EEPROM is under %s control\n"
 			   "pmc551: System Control Register is %slocked to PCI access\n"
-			   "pmc551: System Control Register is %slocked to EEPROM access\n", 
+			   "pmc551: System Control Register is %slocked to EEPROM access\n",
 		(bcmd&0x1)?"software":"hardware",
 		(bcmd&0x20)?"":"un", (bcmd&0x40)?"":"un");
 #endif
@@ -744,7 +744,7 @@
                 priv->start = ioremap(((PCI_Device->resource[0].start)
                                        & PCI_BASE_ADDRESS_MEM_MASK),
                                       priv->asize);
-		
+
 		if (!priv->start) {
 			printk(KERN_NOTICE "pmc551: Unable to map IO space\n");
                         kfree(mtd->priv);
@@ -765,7 +765,7 @@
                                          priv->curr_map0 );
 
 #ifdef CONFIG_MTD_PMC551_DEBUG
-		printk( KERN_DEBUG "pmc551: aperture set to %d\n", 
+		printk( KERN_DEBUG "pmc551: aperture set to %d\n",
 			(priv->base_map0 & 0xF0)>>4 );
 #endif
 
@@ -823,13 +823,13 @@
 	while((mtd=pmc551list)) {
 		priv = mtd->priv;
 		pmc551list = priv->nextpmc551;
-		
+
 		if(priv->start) {
 			printk (KERN_DEBUG "pmc551: unmapping %dM starting at 0x%p\n",
 				priv->asize>>20, priv->start);
 			iounmap (priv->start);
 		}
-		
+
 		kfree (mtd->priv);
 		del_mtd_device (mtd);
 		kfree (mtd);

Index: slram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/slram.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- slram.c	17 Mar 2005 19:44:27 -0000	1.35
+++ slram.c	7 Nov 2005 11:14:25 -0000	1.36
@@ -18,14 +18,14 @@
   <start>: start of the memory region, decimal or hex (0xabcdef)
   <end/offset>: end of the memory region. It's possible to use +0x1234
                 to specify the offset instead of the absolute address
-    
+
   NOTE:
   With slram it's only possible to map a contigous memory region. Therfore
   if there's a device mapped somewhere in the region specified slram will
   fail to load (see kernel log if modprobe fails).
 
   -
-  
+
   Jochen Schaeuble <psionic at psionic.de>
 
 ======================================================================*/
@@ -89,10 +89,10 @@
 	if (instr->addr + instr->len > mtd->size) {
 		return(-EINVAL);
 	}
-	
+
 	memset(priv->start + instr->addr, 0xff, instr->len);
 
-	/* This'll catch a few races. Free the thing before returning :) 
+	/* This'll catch a few races. Free the thing before returning :)
 	 * I don't feel at all ashamed. This kind of thing is possible anyway
 	 * with flash, but unlikely.
 	 */
@@ -170,12 +170,12 @@
 	}
 	(*curmtd)->mtdinfo = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
 	(*curmtd)->next = NULL;
-	
+
 	if ((*curmtd)->mtdinfo)	{
 		memset((char *)(*curmtd)->mtdinfo, 0, sizeof(struct mtd_info));
 		(*curmtd)->mtdinfo->priv =
 			kmalloc(sizeof(slram_priv_t), GFP_KERNEL);
-		
+
 		if (!(*curmtd)->mtdinfo->priv) {
 			kfree((*curmtd)->mtdinfo);
 			(*curmtd)->mtdinfo = NULL;
@@ -188,7 +188,7 @@
 		E("slram: Cannot allocate new MTD device.\n");
 		return(-ENOMEM);
 	}
-	
+
 	if (!(((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start =
 				ioremap(start, length))) {
 		E("slram: ioremap failed\n");
@@ -223,7 +223,7 @@
 	T("slram: Mapped from 0x%p to 0x%p\n",
 			((slram_priv_t *)(*curmtd)->mtdinfo->priv)->start,
 			((slram_priv_t *)(*curmtd)->mtdinfo->priv)->end);
-	return(0);	
+	return(0);
 }
 
 static void unregister_devices(void)
@@ -256,7 +256,7 @@
 	char *buffer;
 	unsigned long devstart;
 	unsigned long devlength;
-	
+
 	if ((!devname) || (!szstart) || (!szlength)) {
 		unregister_devices();
 		return(-EINVAL);
@@ -264,7 +264,7 @@
 
 	devstart = simple_strtoul(szstart, &buffer, 0);
 	devstart = handle_unit(devstart, buffer);
-	
+
 	if (*(szlength) != '+') {
 		devlength = simple_strtoul(szlength, &buffer, 0);
 		devlength = handle_unit(devlength, buffer) - devstart;
@@ -278,7 +278,7 @@
 		E("slram: Illegal start / length parameter.\n");
 		return(-EINVAL);
 	}
-	
+
 	if ((devstart = register_device(devname, devstart, devlength))){
 		unregister_devices();
 		return((int)devstart);
@@ -335,7 +335,7 @@
 	}
 #else
 	int count;
-	
+
 	for (count = 0; (map[count]) && (count < SLRAM_MAX_DEVICES_PARAMS);
 			count++) {
 	}
@@ -350,10 +350,10 @@
 		if (parse_cmdline(devname, map[i * 3 + 1], map[i * 3 + 2])!=0) {
 			return(-EINVAL);
 		}
-		
+
 	}
 #endif /* !MODULE */
-	
+
 	return(0);
 }
 





More information about the linux-mtd-cvs mailing list