Re: [PATCH] crypto: caam: simplify probe resource and IRQ handling

From: Herbert Xu

Date: Mon Aug 10 2026 - 04:08:54 EST


On Thu, Jul 30, 2026 at 01:47:22PM -0700, Rosen Penev wrote:
> Convert the interrupt acquisition from irq_of_parse_and_map() to
> platform_get_irq(), which resolves the IRQ from the device's interrupts
> property via of_irq_get(). Flip the error check from testing for zero to
> testing for a negative errno, and drop the now-unused
> caam_jr_irq_dispose_mapping() callback and its devm_add_action_or_reset()
> cleanup, since platform_get_irq() manages the mapping internally.
>
> Replace the open-coded platform_get_resource() plus devm_ioremap()
> sequence with devm_platform_ioremap_resource(), which fetches the
> resource, requests the region and maps it in one call.
>
> Each fsl,sec-*-job-ring node has a distinct 0x10000 reg region and
> interrupts property, so the region reservation added by
> devm_ioremap_resource() is exclusive and does not introduce overlap
> failures.
>
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> ---
> drivers/crypto/caam/jr.c | 46 +++++++++++-----------------------------
> 1 file changed, 12 insertions(+), 34 deletions(-)

Please check the Sashiko comments on this patch:

https://sashiko.dev/#/patchset/20260730204915.1102403-1-rosenp%40gmail.com

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt