summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKevin Zhang <k.zhang@freescale.com>2008-03-20 15:03:03 -0500
committerDaniel Schaeffer <daniel.schaeffer@timesys.com>2008-08-25 15:20:52 -0400
commit780cba8007b8a66662c304dffe54b1d97b9d173f (patch)
tree059a36702a4bc5c0e87c45c9faa9c30f0f44f494 /drivers
parentd1db1919be713a3326a98eaf56dc0bd5a738d598 (diff)
ENGR00069546 Fix MX31 3stack board boot problem with jffs2
MX31 3stack board boot problem with jffs2. It was caused by recent community JFFS2 patch to support MLC nand by NOT writing to oob area. Even though this is not needed for the NFC on MX31, we have to set the flag: mtd->flags &= ~MTD_OOB_WRITEABLE in the mxc_nd.c driver. Signed-off-by: Kevin Zhang <k.zhang@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/mxc_nd.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/mtd/nand/mxc_nd.c b/drivers/mtd/nand/mxc_nd.c
index 507b346336f0..e858a5b6e4c0 100644
--- a/drivers/mtd/nand/mxc_nd.c
+++ b/drivers/mtd/nand/mxc_nd.c
@@ -15,26 +15,20 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/nand.h>
-#include <linux/mtd/partitions.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/err.h>
-
-#include <asm/mach/flash.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
#include <asm/io.h>
+#include <asm/mach/flash.h>
#include "mxc_nd.h"
-/*!
- * Number of static partitions on NAND Flash.
- */
-#define NUM_PARTITIONS (sizeof(partition_info)/sizeof(struct mtd_partition))
-
-#define DVR_VER "2.0"
+#define DVR_VER "2.1"
struct mxc_mtd_s {
struct mtd_info mtd;
@@ -43,7 +37,7 @@ struct mxc_mtd_s {
struct device *dev;
};
-static struct mxc_mtd_s *mxc_nand_data = NULL;
+static struct mxc_mtd_s *mxc_nand_data;
/*
* Define delays in microsec for NAND device operations
@@ -1113,6 +1107,9 @@ static int mxc_nand_scan_bbt(struct mtd_info *mtd)
if (is2k_Pagesize)
this->ecc.layout = &nand_hw_eccoob_2k;
+ /* jffs2 not write oob */
+ mtd->flags &= ~MTD_OOB_WRITEABLE;
+
/* use flash based bbt */
this->bbt_td = &bbt_main_descr;
this->bbt_md = &bbt_mirror_descr;