Revert "mtd: mxc_nand: fix 2KiB pagesize NAND on i.MX27"

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Oct 20 09:59:01 EDT 2009


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=1cc523999e0acd0c21f83bf89b7a44b4ab6f7bd8
Commit:     1cc523999e0acd0c21f83bf89b7a44b4ab6f7bd8
Parent:     6f4e137e9af8745ccaddaf5dcb037a1175089e1c
Author:     David Woodhouse <David.Woodhouse at intel.com>
AuthorDate: Tue Oct 20 22:02:41 2009 +0900
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Oct 20 22:02:41 2009 +0900

    Revert "mtd: mxc_nand: fix 2KiB pagesize NAND on i.MX27"
    
    This reverts commit 71b7d0d90d536ae4e70929cc59a1a9f6ba457c6c.
    
    The problem which that commit attempted to fix was a bootloader issue,
    which had been misunderstood. The 'fix' causes lots of false bad blocks
    for existing users with sane firmware.
    
    Thanks to Mathieu Berland for diagnosing the problem coherently.
    
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/mxc_nand.c |   16 +---------------
 1 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index ef3e199..06c5314 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -857,17 +857,6 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
 	}
 }
 
-/* Define some generic bad / good block scan pattern which are used
- * while scanning a device for factory marked good / bad blocks. */
-static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
-
-static struct nand_bbt_descr smallpage_memorybased = {
-	.options = NAND_BBT_SCAN2NDPAGE,
-	.offs = 5,
-	.len = 1,
-	.pattern = scan_ff_pattern
-};
-
 static int __init mxcnd_probe(struct platform_device *pdev)
 {
 	struct nand_chip *this;
@@ -984,10 +973,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
 		goto escan;
 	}
 
-	if (mtd->writesize == 2048) {
-		host->pagesize_2k = 1;
-		this->badblock_pattern = &smallpage_memorybased;
-	}
+	host->pagesize_2k = (mtd->writesize == 2048) ? 1 : 0;
 
 	if (this->ecc.mode == NAND_ECC_HW) {
 		switch (mtd->oobsize) {



More information about the linux-mtd-cvs mailing list