diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-12-16 07:51:19 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-12-16 07:51:19 +0000 |
commit | a8feb12f58ff4bbedfc448cd99107f130bc322a8 (patch) | |
tree | c3baa813b2d49c1e5302c7561a89be81af5b3fe0 /target/linux/generic/patches-3.12/508-yaffs-3.3-use-mtd_-helpers.patch | |
parent | a8bc7f528ac71cb6b7405c12cc3c1878b2992164 (diff) | |
download | upstream-a8feb12f58ff4bbedfc448cd99107f130bc322a8.tar.gz upstream-a8feb12f58ff4bbedfc448cd99107f130bc322a8.tar.bz2 upstream-a8feb12f58ff4bbedfc448cd99107f130bc322a8.zip |
kernel: update yaffs code
Use the latest version of the yaffs code. Fetched from the
yaffs2 git tree and it is based on the following commit:
commit bc76682d93955cfb33051beb503ad9f8a5450578
Merge: 3a8580e ffa781d
Author: Charles Manning <cdhmanning@gmail.com>
Date: Thu Jul 11 17:46:25 2013 +1200
Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39084 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.12/508-yaffs-3.3-use-mtd_-helpers.patch')
-rw-r--r-- | target/linux/generic/patches-3.12/508-yaffs-3.3-use-mtd_-helpers.patch | 160 |
1 files changed, 0 insertions, 160 deletions
diff --git a/target/linux/generic/patches-3.12/508-yaffs-3.3-use-mtd_-helpers.patch b/target/linux/generic/patches-3.12/508-yaffs-3.3-use-mtd_-helpers.patch deleted file mode 100644 index 65d45a0be1..0000000000 --- a/target/linux/generic/patches-3.12/508-yaffs-3.3-use-mtd_-helpers.patch +++ /dev/null @@ -1,160 +0,0 @@ ---- a/fs/yaffs2/yaffs_mtdif1.c -+++ b/fs/yaffs2/yaffs_mtdif1.c -@@ -133,7 +133,7 @@ int nandmtd1_WriteChunkWithTagsToNAND(ya - ops.datbuf = (__u8 *)data; - ops.oobbuf = (__u8 *)&pt1; - -- retval = mtd->write_oob(mtd, addr, &ops); -+ retval = mtd_write_oob(mtd, addr, &ops); - if (retval) { - T(YAFFS_TRACE_MTD, - (TSTR("write_oob failed, chunk %d, mtd error %d"TENDSTR), -@@ -194,7 +194,7 @@ int nandmtd1_ReadChunkWithTagsFromNAND(y - /* Read page and oob using MTD. - * Check status and determine ECC result. - */ -- retval = mtd->read_oob(mtd, addr, &ops); -+ retval = mtd_read_oob(mtd, addr, &ops); - if (retval) { - T(YAFFS_TRACE_MTD, - (TSTR("read_oob failed, chunk %d, mtd error %d"TENDSTR), -@@ -218,7 +218,7 @@ int nandmtd1_ReadChunkWithTagsFromNAND(y - /* fall into... */ - default: - rettags(etags, YAFFS_ECC_RESULT_UNFIXED, 0); -- etags->block_bad = (mtd->block_isbad)(mtd, addr); -+ etags->block_bad = mtd_block_isbad(mtd, addr); - return YAFFS_FAIL; - } - -@@ -286,7 +286,7 @@ int nandmtd1_MarkNANDBlockBad(struct yaf - - T(YAFFS_TRACE_BAD_BLOCKS,(TSTR("marking block %d bad"TENDSTR), block_no)); - -- retval = mtd->block_markbad(mtd, (loff_t)blocksize * block_no); -+ retval = mtd_block_markbad(mtd, (loff_t)blocksize * block_no); - return (retval) ? YAFFS_FAIL : YAFFS_OK; - } - -@@ -336,7 +336,7 @@ int nandmtd1_QueryNANDBlock(struct yaffs - return YAFFS_FAIL; - - retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags); -- etags.block_bad = (mtd->block_isbad)(mtd, addr); -+ etags.block_bad = mtd_block_isbad(mtd, addr); - if (etags.block_bad) { - T(YAFFS_TRACE_BAD_BLOCKS, - (TSTR("block %d is marked bad"TENDSTR), block_no)); ---- a/fs/yaffs2/yaffs_vfs_glue.c -+++ b/fs/yaffs2/yaffs_vfs_glue.c -@@ -2607,8 +2607,8 @@ static void yaffs_MTDPutSuper(struct sup - { - struct mtd_info *mtd = yaffs_dev_to_mtd(yaffs_SuperToDevice(sb)); - -- if (mtd->sync) -- mtd->sync(mtd); -+ if (mtd) -+ mtd_sync(mtd); - - put_mtd_device(mtd); - } ---- a/fs/yaffs2/yaffs_mtdif2.c -+++ b/fs/yaffs2/yaffs_mtdif2.c -@@ -77,7 +77,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(ya - ops.ooboffs = 0; - ops.datbuf = (__u8 *)data; - ops.oobbuf = (dev->param.inband_tags) ? NULL : packed_tags_ptr; -- retval = mtd->write_oob(mtd, addr, &ops); -+ retval = mtd_write_oob(mtd, addr, &ops); - - #else - if (!dev->param.inband_tags) { -@@ -133,7 +133,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(y - - #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17)) - if (dev->param.inband_tags || (data && !tags)) -- retval = mtd->read(mtd, addr, dev->param.total_bytes_per_chunk, -+ retval = mtd_read(mtd, addr, dev->param.total_bytes_per_chunk, - &dummy, data); - else if (tags) { - ops.mode = MTD_OPS_AUTO_OOB; -@@ -142,7 +142,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(y - ops.ooboffs = 0; - ops.datbuf = data; - ops.oobbuf = yaffs_dev_to_lc(dev)->spareBuffer; -- retval = mtd->read_oob(mtd, addr, &ops); -+ retval = mtd_read_oob(mtd, addr, &ops); - } - #else - if (!dev->param.inband_tags && data && tags) { -@@ -201,7 +201,7 @@ int nandmtd2_MarkNANDBlockBad(struct yaf - (TSTR("nandmtd2_MarkNANDBlockBad %d" TENDSTR), block_no)); - - retval = -- mtd->block_markbad(mtd, -+ mtd_block_markbad(mtd, - block_no * dev->param.chunks_per_block * - dev->param.total_bytes_per_chunk); - -@@ -221,7 +221,7 @@ int nandmtd2_QueryNANDBlock(struct yaffs - T(YAFFS_TRACE_MTD, - (TSTR("nandmtd2_QueryNANDBlock %d" TENDSTR), block_no)); - retval = -- mtd->block_isbad(mtd, -+ mtd_block_isbad(mtd, - block_no * dev->param.chunks_per_block * - dev->param.total_bytes_per_chunk); - ---- a/fs/yaffs2/yaffs_mtdif.h -+++ b/fs/yaffs2/yaffs_mtdif.h -@@ -31,4 +31,39 @@ int nandmtd_InitialiseNAND(yaffs_dev_t * - #define MTD_OPS_AUTO_OOB MTD_OOB_AUTO - #endif - -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)) -+static inline int mtd_erase(struct mdt_info *mtd, struct erase_info *ei) -+{ -+ return mtd->erase(mtd, ei); -+} -+ -+static inline int mtd_block_markbad(struct mtd_info *mtd, loff_t ofs) -+{ -+ return mtd->block_mark_bad(mtd, ofs); -+} -+ -+static inline int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) -+{ -+ return mtd->block_is_bad(mtd, ofs); -+} -+ -+static inline int mtd_read_oob(struct mtd_info *mtd, loff_t from, -+ struct mtd_oob_ops *ops) -+{ -+ return mtd->read_oob(mtd, from, ops); -+} -+ -+static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to, -+ struct mtd_oob_ops *ops) -+{ -+ return mtd->write_oob(mtd, to, ops); -+} -+ -+static inline void mtd_sync(struct mtd_info *mtd) -+{ -+ if (mtd->sync) -+ mtd->sync(mtd); -+} -+#endif -+ - #endif ---- a/fs/yaffs2/yaffs_mtdif.c -+++ b/fs/yaffs2/yaffs_mtdif.c -@@ -41,7 +41,7 @@ int nandmtd_EraseBlockInNAND(yaffs_dev_t - ei.callback = NULL; - ei.priv = (u_long) dev; - -- retval = mtd->erase(mtd, &ei); -+ retval = mtd_erase(mtd, &ei); - - if (retval == 0) - return YAFFS_OK; |