projects
/
yaffs
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change st_xxx to yst_xxx to fix compilation issues
[yaffs/.git]
/
yaffs_mtdif.c
diff --git
a/yaffs_mtdif.c
b/yaffs_mtdif.c
index a7b6aaedc3379d8a26271a02ccac91da91a52c24..6dede1a55259b29d30ac8bfff80a773da0475373 100644
(file)
--- a/
yaffs_mtdif.c
+++ b/
yaffs_mtdif.c
@@
-13,7
+13,7
@@
*
*/
*
*/
-const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.
8 2003-03-11 05:16:53
charles Exp $";
+const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.
10 2004-09-19 08:14:50
charles Exp $";
#ifdef CONFIG_YAFFS_MTD_ENABLED
#ifdef CONFIG_YAFFS_MTD_ENABLED
@@
-31,6
+31,10
@@
const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.8 2003-03-11 05:16:5
struct nand_oobinfo yaffs_oobinfo = {
useecc: 1,
struct nand_oobinfo yaffs_oobinfo = {
useecc: 1,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8))
+// this is for versions of mtd nand driver in kernel 2.6.8 and later
+ eccbytes: 6,
+#endif
eccpos: {8, 9, 10, 13, 14, 15}
};
eccpos: {8, 9, 10, 13, 14, 15}
};
@@
-114,12
+118,14
@@
int nandmtd_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaf
return YAFFS_FAIL;
}
return YAFFS_FAIL;
}
-
+// Callback not needed for NAND
+#if 0
static void nandmtd_EraseCallback(struct erase_info *ei)
{
yaffs_Device *dev = (yaffs_Device *)ei->priv;
up(&dev->sem);
}
static void nandmtd_EraseCallback(struct erase_info *ei)
{
yaffs_Device *dev = (yaffs_Device *)ei->priv;
up(&dev->sem);
}
+#endif
int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber)
int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber)
@@
-134,7
+140,7
@@
int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber)
ei.len = dev->nBytesPerChunk * dev->nChunksPerBlock;
ei.time = 1000;
ei.retries = 2;
ei.len = dev->nBytesPerChunk * dev->nChunksPerBlock;
ei.time = 1000;
ei.retries = 2;
- ei.callback =
nandmtd_EraseCallback
;
+ ei.callback =
NULL
;
ei.priv = (u_long)dev;
// Todo finish off the ei if required
ei.priv = (u_long)dev;
// Todo finish off the ei if required
@@
-143,7
+149,8
@@
int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber)
retval = mtd->erase(mtd,&ei);
retval = mtd->erase(mtd,&ei);
- down(&dev->sem); // Wait for the erasure to complete
+ //No need for callback
+ // down(&dev->sem); // Wait for the erasure to complete
if (retval == 0)
return YAFFS_OK;
if (retval == 0)
return YAFFS_OK;