summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-02-10 13:59:59 -0500
committerBrian Norris <computersforpeace@gmail.com>2015-03-11 18:20:41 -0400
commit3d6e81c0c9827c86fd3fe4bcbc44155b1401f80e (patch)
tree966c560a00993666a0b2039f6a3140674b496be7 /drivers/mtd
parentc4ca3997ef954bcba009cce0e325f3155bdde01a (diff)
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@pengutronix.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/mxc_nand.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 0afe5904a337..0083b4ee4f33 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,
1153 mxc_do_addr_cycle(mtd, column, page_addr); 1153 mxc_do_addr_cycle(mtd, column, page_addr);
1154 1154
1155 break; 1155 break;
1156 case NAND_CMD_PARAM:
1157 host->devtype_data->send_cmd(host, command, false);
1158 mxc_do_addr_cycle(mtd, column, page_addr);
1159 host->devtype_data->send_page(mtd, NFC_OUTPUT);
1160 memcpy32_fromio(host->data_buf, host->main_area0, 512);
1161 host->buf_start = 0;
1162 break;
1156 } 1163 }
1157} 1164}
1158 1165