Commit e32039db956676619b143cb13aded37fbc0d36d5
Committed by
Ye Li
1 parent
cb43a64389
Exists in
smarc_8mq_lf_v2020.04
and in
4 other branches
MLK-18044-2: crypto: caam: Fix build warnings pointer casting
Enabling CAAM driver for i.MX8M platforms, a 64 bits architecture, lead to casting warnings: from/to pointer to/from integer with different size. This patch fix these warnings Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com> (cherry picked from commit d02fbc7d2957f4788ced017ccf17fd35ab968121) (cherry picked from commit 79e90af14af32e86fd7efd3c84e09a0bd572ab5b) (cherry picked from commit 338786e6c79c2392dfe44c44e94c59fb18d684fd)
Showing 2 changed files with 5 additions and 4 deletions Side-by-side Diff
drivers/crypto/fsl/jr.c
1 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
2 | 2 | /* |
3 | 3 | * Copyright 2008-2014 Freescale Semiconductor, Inc. |
4 | + * Copyright 2018 NXP | |
4 | 5 | * |
5 | 6 | * Based on CAAM driver in drivers/crypto/caam in Linux |
6 | 7 | */ |
7 | 8 | |
... | ... | @@ -29,10 +30,10 @@ |
29 | 30 | }; |
30 | 31 | |
31 | 32 | #define SEC_ADDR(idx) \ |
32 | - ((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx])) | |
33 | + (ulong)((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx])) | |
33 | 34 | |
34 | 35 | #define SEC_JR0_ADDR(idx) \ |
35 | - (SEC_ADDR(idx) + \ | |
36 | + (ulong)(SEC_ADDR(idx) + \ | |
36 | 37 | (CONFIG_SYS_FSL_JR0_OFFSET - CONFIG_SYS_FSL_SEC_OFFSET)) |
37 | 38 | |
38 | 39 | struct jobring jr0[CONFIG_SYS_FSL_MAX_NUM_OF_SEC]; |
include/fsl_sec.h
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | #include <asm/io.h> |
14 | 14 | |
15 | 15 | #ifdef CONFIG_SYS_FSL_SEC_LE |
16 | -#define sec_in32(a) in_le32(a) | |
17 | -#define sec_out32(a, v) out_le32(a, v) | |
16 | +#define sec_in32(a) in_le32((ulong *)(ulong)a) | |
17 | +#define sec_out32(a, v) out_le32((ulong *)(ulong)a, v) | |
18 | 18 | #define sec_in16(a) in_le16(a) |
19 | 19 | #define sec_clrbits32 clrbits_le32 |
20 | 20 | #define sec_setbits32 setbits_le32 |