1 From afbf753cb44a5b7dfb8bcff430b48a4999214f02 Mon Sep 17 00:00:00 2001
2 From: Jason <r64343@freescale.com>
3 Date: Wed, 15 Jul 2009 14:12:05 +0800
4 Subject: [PATCH] ENGR00114236 Disable NAND driver interleave mode support
6 Disable NAND driver interleave mode support
8 Signed-off-by:Jason Liu <r64343@freescale.com>
10 drivers/mtd/nand/mxc_nand.c | 36 +++++++++++++-----------------------
11 1 files changed, 13 insertions(+), 23 deletions(-)
13 diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
14 index ae02d6a..f6dd23b 100644
15 --- a/drivers/mtd/nand/mxc_nand.c
16 +++ b/drivers/mtd/nand/mxc_nand.c
17 @@ -1069,7 +1069,7 @@ static uint8_t mirror_pattern[] = { '1', 't', 'b', 'B' };
19 static struct nand_bbt_descr bbt_main_descr = {
20 .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
21 - | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
22 + | NAND_BBT_2BIT | NAND_BBT_VERSION,
26 @@ -1079,7 +1079,7 @@ static struct nand_bbt_descr bbt_main_descr = {
28 static struct nand_bbt_descr bbt_mirror_descr = {
29 .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
30 - | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP,
31 + | NAND_BBT_2BIT | NAND_BBT_VERSION,
35 @@ -1094,6 +1094,17 @@ static int mxc_nand_scan_bbt(struct mtd_info *mtd)
37 info->page_mask = this->pagemask;
39 + /* limit to 2G size due to Kernel
40 + * larger 4G space support,need fix
43 + if (mtd->size == 0) {
44 + mtd->size = 1 << 31;
46 + this->chipsize = mtd->size;
50 if (IS_2K_PAGE_NAND) {
51 NFC_SET_NFMS(1 << NFMS_NF_PG_SZ);
52 this->ecc.layout = &nand_hw_eccoob_2k;
53 @@ -1107,27 +1118,6 @@ static int mxc_nand_scan_bbt(struct mtd_info *mtd)
57 - /* reconfig for interleave mode */
59 - if (this->numchips > 1 && info->auto_mode) {
60 - info->num_of_intlv = this->numchips;
63 - /* FIXEME:need remove it
64 - * when kernel support
67 - mtd->size = this->chipsize;
68 - mtd->erasesize *= info->num_of_intlv;
69 - mtd->writesize *= info->num_of_intlv;
70 - mtd->oobsize *= info->num_of_intlv;
71 - this->page_shift = ffs(mtd->writesize) - 1;
72 - this->bbt_erase_shift =
73 - this->phys_erase_shift = ffs(mtd->erasesize) - 1;
74 - this->chip_shift = ffs(this->chipsize) - 1;
75 - this->oob_poi = this->buffers->databuf + mtd->writesize;
78 /* propagate ecc.layout to mtd_info */
79 mtd->ecclayout = this->ecc.layout;