mtd: mxc-nand: Implement support for PARAM command
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed Apr 22 10:59:03 PDT 2015
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=3d6e81c0c9827c86fd3fe4bcbc44155b1401f80e
Commit: 3d6e81c0c9827c86fd3fe4bcbc44155b1401f80e
Parent: c4ca3997ef954bcba009cce0e325f3155bdde01a
Author: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
AuthorDate: Tue Feb 10 19:59:59 2015 +0100
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Mar 11 15:20:41 2015 -0700
mtd: mxc-nand: Implement support for PARAM command
The mxc-nand driver never supported the PARAM command to read out the
ONFI parameter page and so always relied on probing my manufacturer and
device id (as provided by the READID command).
This patch implements reading out the first parameter page copy at least
which should be good enough in practise.
This makes the boot log change from
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xb1
nand: Micron NAND 128MiB 1,8V 16-bit
to
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xb1
nand: Micron MT29F1G16ABBDAH4
on my machine.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/mxc_nand.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 0afe590..0083b4e 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1153,6 +1153,13 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command,
mxc_do_addr_cycle(mtd, column, page_addr);
break;
+ case NAND_CMD_PARAM:
+ host->devtype_data->send_cmd(host, command, false);
+ mxc_do_addr_cycle(mtd, column, page_addr);
+ host->devtype_data->send_page(mtd, NFC_OUTPUT);
+ memcpy32_fromio(host->data_buf, host->main_area0, 512);
+ host->buf_start = 0;
+ break;
}
}
More information about the linux-mtd-cvs
mailing list