For 64-bit systems, we only have CAAM initialization support in PBL running as BL2 in EL3, but nothing for barebox proper. Understandably, trying to compile the CAAM code for 64-bit leads to warnings about casts between pointers and smaller integers. A sync with Linux to get 64-bit support is probably in-order for barebox proper CAAM drivers to actually work on i.MX8M, but for now, let's just fix the warnings. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/crypto/caam/jr.c | 2 +- drivers/crypto/caam/rng_self_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index f15902866998..b5d70b24b380 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -207,7 +207,7 @@ int caam_jr_enqueue(struct device *dev, u32 *desc, } head_entry = &jrp->entinfo[head]; - head_entry->desc_addr_virt = phys_to_virt((u32) desc); + head_entry->desc_addr_virt = desc; head_entry->desc_size = desc_size; head_entry->callbk = (void *)cbk; head_entry->cbkarg = areq; diff --git a/drivers/crypto/caam/rng_self_test.c b/drivers/crypto/caam/rng_self_test.c index 3b20f8aad293..b6fcc3bc0947 100644 --- a/drivers/crypto/caam/rng_self_test.c +++ b/drivers/crypto/caam/rng_self_test.c @@ -116,7 +116,7 @@ static void construct_rng_self_test_jobdesc(u32 *desc, const u32 *rng_st_dsc, u8 } /* Replace destination address in the descriptor */ - desc[result_addr_idx] = (u32)res_addr; + desc[result_addr_idx] = virt_to_phys(res_addr); } /* rng_self_test_done() - callback for caam_jr_enqueue */ -- 2.39.2