1
0
Fork 0

MLK-23754-25 remoteproc: imx: use devm_ioremap

We might need to map an region multiple times, becaue the region might
be shared between remote processors, such i.MX8QM with dual M4 cores.
So use devm_ioremap, not devm_ioremap_resource.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peng Fan 2020-03-30 20:48:26 +08:00
parent e966403850
commit 00f33502b6
1 changed files with 3 additions and 2 deletions

View File

@ -767,9 +767,10 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
if (b >= IMX7D_RPROC_MEM_MAX)
break;
priv->mem[b].cpu_addr = devm_ioremap_resource(&pdev->dev, &res);
/* Not use resource version, because we might share region*/
priv->mem[b].cpu_addr = devm_ioremap(&pdev->dev, res.start, resource_size(&res));
if (IS_ERR(priv->mem[b].cpu_addr)) {
dev_err(dev, "devm_ioremap_resource failed\n");
dev_err(dev, "devm_ioremap failed\n");
err = PTR_ERR(priv->mem[b].cpu_addr);
return err;
}