From 68170d910ab607bfff58f9d347a79186d00e29c8 Mon Sep 17 00:00:00 2001 From: Jason Liu Date: Tue, 16 Nov 2010 17:00:16 +0800 Subject: ENGR00133756:UBOOT:NAND:Remove the 2G limitation from NAND driver Remove the 2G limitation from NAND driver since currently kernel can support more than 2GB NAND flash now. This commit will make NAND driver rescan the whole NAND to create one BBT and store to the last 4 blocks of the larger than 2GB NAND flash. This commit will have no effect on the NAND which size is not larger than 2GB. Signed-off-by: Jason Liu (cherry picked from commit a649f3032601d263899a97150c1e7f4fa09b2d19) --- drivers/mtd/nand/mxc_nand.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 4c5bbdb..a098c8f 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -1166,16 +1166,6 @@ static int mxc_nand_scan_bbt(struct mtd_info *mtd) mtd->oobsize = dev_info->page_total_size_in_bytes & 0x3ff;; mtd->erasesize = dev_info->block_size_in_pages * mtd->writesize; - /* limit to 2G size due to Kernel - * larger 4G space support,need fix - * it later - */ - if ((u32)mtd->size == 0) { - mtd->size = (u32)(1 << 31); - this->numchips = 1; - this->chipsize = mtd->size; - } - /* Calculate the address shift from the page size */ this->page_shift = ffs(mtd->writesize) - 1; /* Convert chipsize to number of pages per chip -1. */ -- cgit v1.1