mtd: nand: denali: pass col argument to READID operation

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 6 10:59:05 PST 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9c07d094bbfe3d09e4c3e01a81cd1399bd23b268
Commit:     9c07d094bbfe3d09e4c3e01a81cd1399bd23b268
Parent:     16c863bbf4dabc1ff67d5c67d2d6e614211528d4
Author:     Enrico Jorns <ejo at pengutronix.de>
AuthorDate: Fri Sep 18 10:02:41 2015 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Sep 29 11:31:55 2015 -0700

    mtd: nand: denali: pass col argument to READID operation
    
    A read id operation followed by 0x00 reads the device ID while
    a read id operation followed by 0x20 reads the possible ONFI identifier.
    
    As the READID function did not propagate the second id parameter but had
    a hard-coded call for 0x90 0x00, reading the ONFI identifier was not
    possible and thus chips werde not detected (tested with
    MT29F8G08ABABAWP)
    
    Signed-off-by: Enrico Jorns <ejo at pengutronix.de>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/denali.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 870c7fc..7b6186f 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1304,7 +1304,7 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col,
 		 */
 		addr = MODE_11 | BANK(denali->flash_bank);
 		index_addr(denali, addr | 0, 0x90);
-		index_addr(denali, addr | 1, 0);
+		index_addr(denali, addr | 1, col);
 		for (i = 0; i < 8; i++) {
 			index_addr_read_data(denali, addr | 2, &id);
 			write_byte_to_buf(denali, id);



More information about the linux-mtd-cvs mailing list