changeset 59:00464f69ccdb

Remove the support for the old MTD.
author luc
date Mon, 01 Aug 2005 21:52:35 +0100
parents 396d1a538fe3
children 0d4ecc74db1f
files Makefile yaffs_fs.c yaffs_mtdif.c yaffs_mtdif2.c
diffstat 4 files changed, 1 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile
+++ b/Makefile
@@ -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
 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)
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -1384,10 +1384,8 @@ static struct super_block *yaffs_interna
 			   !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_interna
 			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 )
 			{
--- a/yaffs_mtdif.c
+++ b/yaffs_mtdif.c
@@ -24,10 +24,7 @@ const char *yaffs_mtdif_c_version = "$Id
 #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_Devic
 	
 	__u8 *spareAsBytes = (__u8 *)spare;
 
-#ifndef	CONFIG_YAFFS_USE_OLD_MTD
 	if(data && spare)
 	{
 		if(dev->useNANDECC)
@@ -59,14 +55,11 @@ int nandmtd_WriteChunkToNAND(yaffs_Devic
 	}
 	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_Devi
 	
 	__u8 *spareAsBytes = (__u8 *)spare;
 	
-#ifndef	CONFIG_YAFFS_USE_OLD_MTD
 	if(data && spare)
 	{
 		if(dev->useNANDECC)
@@ -99,14 +91,11 @@ int nandmtd_ReadChunkFromNAND(yaffs_Devi
 	}
 	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;
--- a/yaffs_mtdif2.c
+++ b/yaffs_mtdif2.c
@@ -50,7 +50,6 @@ int nandmtd2_WriteChunkWithTagsToNAND(ya
 		yaffs_PackTags2(&pt,tags);
 	}
 
-#ifndef	CONFIG_YAFFS_USE_OLD_MTD
 	if(data && tags)
 	{
 		if(dev->useNANDECC)
@@ -60,15 +59,12 @@ int nandmtd2_WriteChunkWithTagsToNAND(ya
 	}
 	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(y
 
 	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(y
 	}
 	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));