linux/drivers/crypto/caam
Rosen Penev 53cf0f26ee crypto: caam - map job ring registers without claiming region
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: 9a955c0a7d ("crypto: caam - simplify probe resource and IRQ handling")
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reported-by: Emanuele Ghidoli <ghidoliemanuele@gmail.com>
Tested-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Tested-by: Richard Leitner <richard.leitner@linux.dev> # i.MX8MP
Tested-by: Sahil Malhotra <sahil.malhotra@nxp.com> # i.MX8MM-EVK
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-09-16 19:55:13 +10:00
..
blob_gen.c KEYS: trusted: caam based protected key 2025-10-20 12:10:28 +08:00
caamalg_desc.c crypto: caam - Add support of paes algorithm 2025-10-20 12:10:28 +08:00
caamalg_desc.h crypto: caam - Add support of paes algorithm 2025-10-20 12:10:28 +08:00
caamalg_qi.c crypto: caam - use print_hex_dump_devel to guard key hex dumps 2026-05-07 16:10:02 +08:00
caamalg_qi2.c crypto: caam - use print_hex_dump_devel to guard key hex dumps 2026-05-07 16:10:02 +08:00
caamalg_qi2.h crypto: caam - fix netdev memory leak in dpaa2_caam_probe 2026-01-31 10:52:31 +08:00
caamalg.c crypto: caam - use print_hex_dump_devel to guard key hex dumps 2026-05-07 16:10:02 +08:00
caamhash_desc.c crypto: caam - drop unexpected word 'for' in comments 2022-06-30 15:56:57 +08:00
caamhash_desc.h
caamhash.c crypto: caam - use print_hex_dump_devel to guard key hex dumps 2026-05-07 16:10:02 +08:00
caampkc.c crypto: caam - add error check to caam_rsa_set_priv_key_form 2024-11-15 19:52:51 +08:00
caampkc.h crypto: caam - Use new crypto_engine_op interface 2023-08-18 17:01:10 +08:00
caamrng.c crypto: caam - Add check for kcalloc() in test_len() 2025-10-17 16:03:57 +08:00
compat.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
ctrl.c crypto: caam - double the entropy delay interval for retry 2025-09-13 12:11:06 +08:00
ctrl.h
debugfs.c crypto: caam - avoid option aliasing with the CONFIG_CAAM_QI build option 2025-07-18 20:51:59 +10:00
debugfs.h crypto: caam - avoid option aliasing with the CONFIG_CAAM_QI build option 2025-07-18 20:51:59 +10:00
desc_constr.h crypto: caam - Add support of paes algorithm 2025-10-20 12:10:28 +08:00
desc.h KEYS: trusted: caam based protected key 2025-10-20 12:10:28 +08:00
dpseci_cmd.h
dpseci-debugfs.c crypto: caam - remove unnecessary (void*) conversions 2023-03-24 18:22:29 +08:00
dpseci-debugfs.h
dpseci.c
dpseci.h
error.c
error.h
intern.h crypto: caam - Remove crypto_rng interface 2026-07-05 13:27:15 +08:00
jr.c crypto: caam - map job ring registers without claiming region 2026-09-16 19:55:13 +10:00
jr.h
Kconfig crypto: caam - Remove crypto_rng interface 2026-07-05 13:27:15 +08:00
key_gen.c crypto: caam - use print_hex_dump_devel to guard key hex dumps 2026-05-07 16:10:02 +08:00
key_gen.h
Makefile crypto: caam - Remove crypto_rng interface 2026-07-05 13:27:15 +08:00
pdb.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
pkc_desc.c
qi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qi.h crypto: caam - Remove GFP_DMA and add DMA alignment padding 2023-01-06 17:15:47 +08:00
regs.h crypto: caam - add power management support 2023-08-04 16:59:55 +08:00
sg_sw_qm.h
sg_sw_qm2.h
sg_sw_sec4.h