Commit 81f22888 authored by Franck LENORMAND's avatar Franck LENORMAND Committed by Herbert Xu

crypto: caam - remove deadcode on 32-bit platforms

When building on a platform with a 32bit DMA address, taking the
upper 32 bits makes no sense.
Signed-off-by: default avatarFranck LENORMAND <franck.lenormand@nxp.com>
Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f892a21f
......@@ -173,9 +173,14 @@ static inline u64 rd_reg64(void __iomem *reg)
static inline u64 cpu_to_caam_dma64(dma_addr_t value)
{
if (caam_imx)
return (((u64)cpu_to_caam32(lower_32_bits(value)) << 32) |
(u64)cpu_to_caam32(upper_32_bits(value)));
if (caam_imx) {
u64 ret_val = (u64)cpu_to_caam32(lower_32_bits(value)) << 32;
if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT))
ret_val |= (u64)cpu_to_caam32(upper_32_bits(value));
return ret_val;
}
return cpu_to_caam64(value);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment