Commit f7b66e5e authored by John Ogness's avatar John Ogness Committed by David Woodhouse

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: default avatarJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Tested-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 76be97c1
...@@ -402,16 +402,16 @@ static void send_read_id_v1_v2(struct mxc_nand_host *host) ...@@ -402,16 +402,16 @@ static void send_read_id_v1_v2(struct mxc_nand_host *host)
/* Wait for operation to complete */ /* Wait for operation to complete */
wait_op_done(host, true); wait_op_done(host, true);
memcpy(host->data_buf, host->main_area0, 16);
if (this->options & NAND_BUSWIDTH_16) { if (this->options & NAND_BUSWIDTH_16) {
void __iomem *main_buf = host->main_area0;
/* compress the ID info */ /* compress the ID info */
writeb(readb(main_buf + 2), main_buf + 1); host->data_buf[1] = host->data_buf[2];
writeb(readb(main_buf + 4), main_buf + 2); host->data_buf[2] = host->data_buf[4];
writeb(readb(main_buf + 6), main_buf + 3); host->data_buf[3] = host->data_buf[6];
writeb(readb(main_buf + 8), main_buf + 4); host->data_buf[4] = host->data_buf[8];
writeb(readb(main_buf + 10), main_buf + 5); host->data_buf[5] = host->data_buf[10];
} }
memcpy(host->data_buf, host->main_area0, 16);
} }
static uint16_t get_dev_status_v3(struct mxc_nand_host *host) static uint16_t get_dev_status_v3(struct mxc_nand_host *host)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment