[PATCH] mtd: rawnand: arasan: Use the right DMA mask
Miquel Raynal
miquel.raynal at bootlin.com
Thu May 27 01:45:48 PDT 2021
Xilinx ZynqMP SoC and the Arasan controller support 64-bit DMA
addressing. Define the right mask otherwise the default is 32
and some accesses may overflow the default mask.
Reported-by: Jorge Courett <jorge.courett at gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
drivers/mtd/nand/raw/arasan-nand-controller.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/nand/raw/arasan-nand-controller.c b/drivers/mtd/nand/raw/arasan-nand-controller.c
index 97e5a336a760..6e8d33173c6b 100644
--- a/drivers/mtd/nand/raw/arasan-nand-controller.c
+++ b/drivers/mtd/nand/raw/arasan-nand-controller.c
@@ -1398,6 +1398,10 @@ static int anfc_probe(struct platform_device *pdev)
if (ret)
goto disable_controller_clk;
+ ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
+ if (ret)
+ return ret;
+
ret = anfc_parse_cs(nfc);
if (ret)
goto disable_bus_clk;
--
2.27.0
More information about the linux-mtd
mailing list