From: luc Date: Mon, 1 Aug 2005 20:52:35 +0000 (+0000) Subject: Remove the support for the old MTD. X-Git-Tag: pre-name-change~430 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=e528916d3c9c87aa1547b1cc2536389ef5efbcb3;ds=sidebyside Remove the support for the old MTD. --- diff --git a/Makefile b/Makefile index 5a78292..2280398 100644 --- 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) diff --git a/yaffs_fs.c b/yaffs_fs.c index 0c98434..3f8cf2a 100644 --- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -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 ) { diff --git a/yaffs_mtdif.c b/yaffs_mtdif.c index 13df3d9..4c87542 100644 --- a/yaffs_mtdif.c +++ b/yaffs_mtdif.c @@ -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; diff --git a/yaffs_mtdif2.c b/yaffs_mtdif2.c index e623690..9cf9828 100644 --- a/yaffs_mtdif2.c +++ b/yaffs_mtdif2.c @@ -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));