aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mxc_nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/mxc_nand.c')
-rw-r--r--drivers/mtd/nand/mxc_nand.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 45204e41a028..20e1241bd099 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -530,12 +530,23 @@ static void send_page_v1(struct mtd_info *mtd, unsigned int ops)
530 530
531static void send_read_id_v3(struct mxc_nand_host *host) 531static void send_read_id_v3(struct mxc_nand_host *host)
532{ 532{
533 struct nand_chip *this = &host->nand;
534
533 /* Read ID into main buffer */ 535 /* Read ID into main buffer */
534 writel(NFC_ID, NFC_V3_LAUNCH); 536 writel(NFC_ID, NFC_V3_LAUNCH);
535 537
536 wait_op_done(host, true); 538 wait_op_done(host, true);
537 539
538 memcpy32_fromio(host->data_buf, host->main_area0, 16); 540 memcpy32_fromio(host->data_buf, host->main_area0, 16);
541
542 if (this->options & NAND_BUSWIDTH_16) {
543 /* compress the ID info */
544 host->data_buf[1] = host->data_buf[2];
545 host->data_buf[2] = host->data_buf[4];
546 host->data_buf[3] = host->data_buf[6];
547 host->data_buf[4] = host->data_buf[8];
548 host->data_buf[5] = host->data_buf[10];
549 }
539} 550}
540 551
541/* Request the NANDFC to perform a read of the NAND device ID. */ 552/* Request the NANDFC to perform a read of the NAND device ID. */