mtd: gpmi: scan two nand chips

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Nov 13 13:59:05 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=a5370e9ed567e68ac261b28a242832eb09fe8559
Commit:     a5370e9ed567e68ac261b28a242832eb09fe8559
Parent:     a7c12d016aa50762e4816308f46e2572ff9b5a01
Author:     Huang Shijie <b32955 at freescale.com>
AuthorDate: Tue Aug 27 17:29:06 2013 +0800
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 6 23:33:03 2013 -0800

    mtd: gpmi: scan two nand chips
    
    Some nand chip has two DIEs in a single chip, such as Micron MT29F32G08QAA.
    Each die has its own chip select pin, so this chip acts as two nand
    chips.
    
    If we only scan one chip, we may find that we only get 2G for this chip,
    but in actually, this chip's size is 4G.
    
    So scan two chips by default.
    
    Signed-off-by: Huang Shijie <b32955 at freescale.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index a5c60c4..7ac2280 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -1674,7 +1674,7 @@ static int gpmi_nfc_init(struct gpmi_nand_data *this)
 	if (ret)
 		goto err_out;
 
-	ret = nand_scan_ident(mtd, 1, NULL);
+	ret = nand_scan_ident(mtd, 2, NULL);
 	if (ret)
 		goto err_out;
 



More information about the linux-mtd-cvs mailing list