Re: [PATCH] crypto: caam: map job ring registers without claiming region
From: Francesco Dolcini
Date: Wed Sep 02 2026 - 02:11:58 EST
+ Emanuele
On Tue, Sep 01, 2026 at 01:37:36PM -0700, Rosen Penev wrote:
> devm_platform_ioremap_resource() ends up calling request_mem_region(),
> which fails with -EBUSY on i.MX SoCs:
>
> There the job rings are modelled as sub-regions of their parent
> fsl,sec-v4.0 register window, and caam_probe() already reserves the
> whole window exclusively via devm_of_iomap() before the children are
> populated. Every job ring therefore collides with its own parent and
> fails to probe, taking the hardware RNG offline (seen on i.MX6, i.MX7
> and i.MX8 boards such as colibri-imx7 and verdin-imx8mp).
>
> Map the job ring registers with devm_ioremap() instead, which does not
> claim the (already owned) region.
>
> Fixes: 9a955c0a7d11 ("crypto: caam - simplify probe resource and IRQ handling")
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
Reported-by: Emanuele Ghidoli <ghidoliemanuele@xxxxxxxxx>
Closes: https://lore.kernel.org/lkml/20260901194524.908240-1-ghidoliemanuele@xxxxxxxxx/
Thanks,
Francesco