[PATCH] mtd: rawnand: arasan: Use the right DMA mask

jorge courett jorge.courett at gmail.com
Thu May 27 06:00:16 PDT 2021


On Thu, May 27, 2021 at 5:45 AM Miquel Raynal <miquel.raynal at bootlin.com> wrote:
>
> 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>

Tested-by: Jorge Courett <jorge.courett at gmail.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