diff options
author | Roshni Shah <shah.roshni@yahoo.com> | 2011-03-14 06:49:42 -0400 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2012-03-02 16:59:46 -0500 |
commit | 2731b2eadeaa141e6f305fa8086106608112bbaa (patch) | |
tree | 2702d45bac84073cd580ccb1bd3eafb9a000d3b6 /fs/jffs2/scan.c | |
parent | 6d23f5084c975be637f7d748db82116bf84d3872 (diff) |
Add support for the i.MX53 QSB2.6.35.3-mx53-early-201103141049
This patch seems to have originated from the 11.01.00 release
from Freescale, which is no longer available except through the
gitweb interface from Freescale.
http://opensource.freescale.com/git?p=imx/linux-2.6-imx.git;a=commit;h=27fdf7bae11978d21e8aba09bb635f49b07edd4a
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r-- | fs/jffs2/scan.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 46f870d1cc36..a0d222496a3d 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -112,7 +112,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c) if (!flashbuf) { /* For NAND it's quicker to read a whole eraseblock at a time, apparently */ - if (jffs2_cleanmarker_oob(c)) + if (c->mtd->type == MTD_NANDFLASH) buf_size = c->sector_size; else buf_size = PAGE_SIZE; @@ -451,22 +451,24 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo D1(printk(KERN_DEBUG "jffs2_scan_eraseblock(): Scanning block at 0x%x\n", ofs)); #ifdef CONFIG_JFFS2_FS_WRITEBUFFER - if (jffs2_cleanmarker_oob(c)) { + if (c->mtd->type == MTD_NANDFLASH) { int ret; if (c->mtd->block_isbad(c->mtd, jeb->offset)) return BLK_STATE_BADBLOCK; - ret = jffs2_check_nand_cleanmarker(c, jeb); - D2(printk(KERN_NOTICE "jffs_check_nand_cleanmarker returned %d\n",ret)); + if (jffs2_cleanmarker_oob(c)) { + ret = jffs2_check_nand_cleanmarker(c, jeb); + D2(printk(KERN_NOTICE "jffs_check_nand_cleanmarker returned %d\n", ret)); - /* Even if it's not found, we still scan to see - if the block is empty. We use this information - to decide whether to erase it or not. */ - switch (ret) { - case 0: cleanmarkerfound = 1; break; - case 1: break; - default: return ret; + /* Even if it's not found, we still scan to see + if the block is empty. We use this information + to decide whether to erase it or not. */ + switch (ret) { + case 0: cleanmarkerfound = 1; break; + case 1: break; + default: return ret; + } } } #endif |