summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorAlison Wang <b18965@freescale.com>2017-05-22 05:05:26 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:31 (GMT)
commitd94fe6f3ff600083512a3cac21baba64c64658c0 (patch)
treee1778b7069a5c2546112d5c5bbc23064940d2e8f /drivers/mtd
parent4780e0e2349632cf395d26423ebe012ea948f337 (diff)
downloadlinux-d94fe6f3ff600083512a3cac21baba64c64658c0.tar.xz
driver: spi: fsl-quad: Hang memcpy: Unhandled fault: alignment fault
vmap/iomap based on whether the buffer is in memory region or reserved region.However, both map it as non-cacheable memory.For armv8 specifically, non-cacheable mapping requests use a memory type that has to be accessed aligned to the request size.memcpy() doesn't guarantee that. memcpy_toio() can guarantee 4-bytes alignment. Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/fsl-quadspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
index bee8fe7..fea7173 100644
--- a/drivers/mtd/spi-nor/fsl-quadspi.c
+++ b/drivers/mtd/spi-nor/fsl-quadspi.c
@@ -1072,7 +1072,7 @@ static ssize_t fsl_qspi_read(struct spi_nor *nor, loff_t from,
len);
/* Read out the data directly from the AHB buffer.*/
- memcpy(buf, q->ahb_addr + q->chip_base_addr + from - q->memmap_offs,
+ memcpy_toio(buf, q->ahb_addr + q->chip_base_addr + from - q->memmap_offs,
len);
return len;