aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mxc_nand.c
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2010-06-18 12:59:47 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-08-26 19:29:09 -0400
commitf7b66e5e51d31c45c6039db9a6da7863fb75be1e (patch)
tree6bb1e4514804a08c0231a653450dc01d467a4a63 /drivers/mtd/nand/mxc_nand.c
parent76be97c1fc945db08aae1f1b746012662d643e97 (diff)
mxc_nand: Do not do byte accesses to the NFC buffer.
This patch avoids byte access to the NFC buffer. Byte access to the NFC is not allowed. The patch is against linux-next 20100618. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/mxc_nand.c')
-rw-r--r--drivers/mtd/nand/mxc_nand.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index fcf8ceb277d..26caa01e34a 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -402,16 +402,16 @@ static void send_read_id_v1_v2(struct mxc_nand_host *host)
402 /* Wait for operation to complete */ 402 /* Wait for operation to complete */
403 wait_op_done(host, true); 403 wait_op_done(host, true);
404 404
405 memcpy(host->data_buf, host->main_area0, 16);
406
405 if (this->options & NAND_BUSWIDTH_16) { 407 if (this->options & NAND_BUSWIDTH_16) {
406 void __iomem *main_buf = host->main_area0;
407 /* compress the ID info */ 408 /* compress the ID info */
408 writeb(readb(main_buf + 2), main_buf + 1); 409 host->data_buf[1] = host->data_buf[2];
409 writeb(readb(main_buf + 4), main_buf + 2); 410 host->data_buf[2] = host->data_buf[4];
410 writeb(readb(main_buf + 6), main_buf + 3); 411 host->data_buf[3] = host->data_buf[6];
411 writeb(readb(main_buf + 8), main_buf + 4); 412 host->data_buf[4] = host->data_buf[8];
412 writeb(readb(main_buf + 10), main_buf + 5); 413 host->data_buf[5] = host->data_buf[10];
413 } 414 }
414 memcpy(host->data_buf, host->main_area0, 16);
415} 415}
416 416
417static uint16_t get_dev_status_v3(struct mxc_nand_host *host) 417static uint16_t get_dev_status_v3(struct mxc_nand_host *host)