Remove the support for the old MTD.
authorluc <luc>
Mon, 1 Aug 2005 20:52:35 +0000 (20:52 +0000)
committerluc <luc>
Mon, 1 Aug 2005 20:52:35 +0000 (20:52 +0000)
Makefile
yaffs_fs.c
yaffs_mtdif.c
yaffs_mtdif2.c

index 5a7829270e225be4432c5acd97072253debcf7a3..2280398ff08228d5d5c2fe623d57088b41062e6f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@
 # it under the terms of the GNU General Public License version 2 as
 # published by the Free Software Foundation.
 #
-# $Id: Makefile,v 1.4 2005-07-31 09:26:35 marty Exp $
+# $Id: Makefile,v 1.5 2005-08-01 20:52:35 luc Exp $
 #
 
 ## Change or override  KERNELDIR to your kernel
@@ -55,13 +55,6 @@ USE_MTD_2 = -DCONFIG_YAFFS_YAFFS2
 
 # USE_RAM_FOR_TEST_2 = -DCONFIG_YAFFS2_RAM_ENABLED
 
-# CONFIG_YAFFS_USE_OLD_MTD
-# Enable this to use the old MTD stuff that did not have yaffs support.
-# You can use this to get around compilation problems, but the best
-# thing to do is to upgrade your MTD support. You will get better speed.
-
-#USE_OLD_MTD = -DCONFIG_YAFFS_USE_OLD_MTD
-
 # CONFIG_YAFFS_USE_NANDECC
 # This enables the ECC functions of the generic MTD-NAND driver.
 # This will not work if you are using the old mtd.
@@ -114,7 +107,7 @@ WIERD_COMPILE_CONFIGS = -DNR_IRQS=1 -DNR_IRQ_VECTORS=1
 YAFFS_CONFIGS = $(WIERD_COMPILE_CONFIGS) \
                 $(USE_RAM_FOR_TEST) $(USE_MTD) $(USE_RAM_FOR_TEST_2) $(USE_MTD_2)\
                 $(USE_HEADER_FILE_SIZE) $(IGNORE_CHUNK_ERASED) $(IGNORE_WRITE_VERIFY) \
-                $(ENABLE_SHORT_NAMES_IN_RAM) $(USE_NANDECC) $(USE_OLD_MTD) $(USE_WRONGECC)
+                $(ENABLE_SHORT_NAMES_IN_RAM) $(USE_NANDECC) $(USE_WRONGECC)
 
 
 YAFFS2_CONFIGS = $(YAFFS_CONFIGS)
index 0c98434e6d86b10ea5f6f0836647ecd4bcd795e6..3f8cf2a9f14be85a1912c7a948f1be580b76ea27 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 
-const char *yaffs_fs_c_version = "$Id: yaffs_fs.c,v 1.22 2005-08-01 20:50:24 luc Exp $";
+const char *yaffs_fs_c_version = "$Id: yaffs_fs.c,v 1.23 2005-08-01 20:52:35 luc Exp $";
 extern const char *yaffs_guts_c_version;
 
 
@@ -1384,10 +1384,8 @@ static struct super_block *yaffs_internal_read_super(int yaffsVersion,int useRam
                           !mtd->block_markbad ||
                           !mtd->read  ||
                           !mtd->write ||
-#ifndef CONFIG_YAFFS_USE_OLD_MTD
                           !mtd->write_ecc ||
                           !mtd->read_ecc ||
-#endif
                           !mtd->read_oob ||
                           !mtd->write_oob )
                        {
@@ -1407,10 +1405,8 @@ static struct super_block *yaffs_internal_read_super(int yaffsVersion,int useRam
                        if(!mtd->erase ||
                           !mtd->read  ||
                           !mtd->write ||
-#ifndef CONFIG_YAFFS_USE_OLD_MTD
                           !mtd->write_ecc ||
                           !mtd->read_ecc ||
-#endif
                           !mtd->read_oob ||
                           !mtd->write_oob )
                        {
index 13df3d98a8faa7bd4b71b641606f6b445e994786..4c87542e71b5e525cd12dbd569b59e23fc85de0a 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.6 2005-07-31 08:38:41 marty Exp $";
+const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.7 2005-08-01 20:52:35 luc Exp $";
  
 #include "yportenv.h"
 
@@ -24,10 +24,7 @@ const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.6 2005-07-31 08:38:4
 #include "linux/mtd/mtd.h"
 #include "linux/types.h"
 #include "linux/time.h"
-
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
 #include "linux/mtd/nand.h"
-#endif
 
 static struct nand_oobinfo yaffs_oobinfo = {
        .useecc = 1,
@@ -49,7 +46,6 @@ int nandmtd_WriteChunkToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data,
        
        __u8 *spareAsBytes = (__u8 *)spare;
 
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        if(data && spare)
        {
                if(dev->useNANDECC)
@@ -59,14 +55,11 @@ int nandmtd_WriteChunkToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data,
        }
        else
        {
-#endif
        if(data)
                retval = mtd->write(mtd,addr,dev->nBytesPerChunk,&dummy,data);
        if(spare)
                retval = mtd->write_oob(mtd,addr,YAFFS_BYTES_PER_SPARE,&dummy,spareAsBytes);
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        }
-#endif
 
     if (retval == 0)
        return YAFFS_OK;
@@ -84,7 +77,6 @@ int nandmtd_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaf
        
        __u8 *spareAsBytes = (__u8 *)spare;
        
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        if(data && spare)
        {
                if(dev->useNANDECC)
@@ -99,14 +91,11 @@ int nandmtd_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaf
        }
        else
        {
-#endif
        if(data)
                retval = mtd->read(mtd,addr,dev->nBytesPerChunk,&dummy,data);
        if(spare)
                retval = mtd->read_oob(mtd,addr,YAFFS_BYTES_PER_SPARE,&dummy,spareAsBytes);
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        }
-#endif
 
     if (retval == 0)
        return YAFFS_OK;
index e6236902d5682a8076d8b80d6ba427b3028b8ca6..9cf9828ed749e8d30dc6b039c226f6e33f5f020e 100644 (file)
@@ -15,7 +15,7 @@
 
 // mtd interface for YAFFS2
 
-const char *yaffs_mtdif2_c_version = "$Id: yaffs_mtdif2.c,v 1.5 2005-07-31 08:38:41 marty Exp $";
+const char *yaffs_mtdif2_c_version = "$Id: yaffs_mtdif2.c,v 1.6 2005-08-01 20:52:35 luc Exp $";
  
 #include "yportenv.h"
 
@@ -50,7 +50,6 @@ int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __
                yaffs_PackTags2(&pt,tags);
        }
 
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        if(data && tags)
        {
                if(dev->useNANDECC)
@@ -60,15 +59,12 @@ int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __
        }
        else
        {
-#endif
        if(data)
                retval = mtd->write(mtd,addr,dev->nBytesPerChunk,&dummy,data);
        if(tags)
                retval = mtd->write_oob(mtd,addr,mtd->oobsize,&dummy,(__u8 *)&pt);
                
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        }
-#endif
 
     if (retval == 0)
        return YAFFS_OK;
@@ -89,7 +85,6 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *
 
        T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_ReadChunkWithTagsToNAND chunk %d data %p tags %p" TENDSTR),chunkInNAND,data,tags));   
 
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        if(data && tags)
        {
                if(dev->useNANDECC)
@@ -103,14 +98,11 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *
        }
        else
        {
-#endif
        if(data)
                retval = mtd->read(mtd,addr,dev->nBytesPerChunk,&dummy,data);
        if(tags)
                retval = mtd->read_oob(mtd,addr,mtd->oobsize,&dummy,dev->spareBuffer);
-#ifndef        CONFIG_YAFFS_USE_OLD_MTD
        }
-#endif
 
     memcpy(&pt,dev->spareBuffer,sizeof(pt));