# 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
# 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.
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)
*/
-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;
!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 )
{
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 )
{
*
*/
-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"
#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,
__u8 *spareAsBytes = (__u8 *)spare;
-#ifndef CONFIG_YAFFS_USE_OLD_MTD
if(data && spare)
{
if(dev->useNANDECC)
}
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;
__u8 *spareAsBytes = (__u8 *)spare;
-#ifndef CONFIG_YAFFS_USE_OLD_MTD
if(data && spare)
{
if(dev->useNANDECC)
}
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;
// 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"
yaffs_PackTags2(&pt,tags);
}
-#ifndef CONFIG_YAFFS_USE_OLD_MTD
if(data && tags)
{
if(dev->useNANDECC)
}
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;
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)
}
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));