aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymen Sghaier <aymen.sghaier@nxp.com>2021-03-25 17:30:26 +0800
committerStefano Babic <sbabic@denx.de>2021-04-08 09:18:29 +0200
commitdde92e2d1501c0f4e7fc04e10b2a9614a1d63e32 (patch)
tree06f73769c5efa3ec40f2c0e6e4d5023a0745189a
parent940d36d5d1d2dc2697b0b379712a3bf40a34e57a (diff)
downloadu-boot-dde92e2d1501c0f4e7fc04e10b2a9614a1d63e32.zip
u-boot-dde92e2d1501c0f4e7fc04e10b2a9614a1d63e32.tar.gz
u-boot-dde92e2d1501c0f4e7fc04e10b2a9614a1d63e32.tar.bz2
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> Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r--drivers/crypto/fsl/jr.c5
-rw-r--r--include/fsl_sec.h4
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index de5e68b..68954db 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2008-2014 Freescale Semiconductor, Inc.
+ * Copyright 2018 NXP
*
* Based on CAAM driver in drivers/crypto/caam in Linux
*/
@@ -35,10 +36,10 @@ uint32_t sec_offset[CONFIG_SYS_FSL_MAX_NUM_OF_SEC] = {
};
#define SEC_ADDR(idx) \
- ((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx]))
+ (ulong)((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx]))
#define SEC_JR0_ADDR(idx) \
- (SEC_ADDR(idx) + \
+ (ulong)(SEC_ADDR(idx) + \
(CONFIG_SYS_FSL_JR0_OFFSET - CONFIG_SYS_FSL_SEC_OFFSET))
struct jobring jr0[CONFIG_SYS_FSL_MAX_NUM_OF_SEC];
diff --git a/include/fsl_sec.h b/include/fsl_sec.h
index c531a14..dca0dd0 100644
--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -13,8 +13,8 @@
#include <asm/io.h>
#ifdef CONFIG_SYS_FSL_SEC_LE
-#define sec_in32(a) in_le32(a)
-#define sec_out32(a, v) out_le32(a, v)
+#define sec_in32(a) in_le32((ulong *)(ulong)a)
+#define sec_out32(a, v) out_le32((ulong *)(ulong)a, v)
#define sec_in16(a) in_le16(a)
#define sec_clrbits32 clrbits_le32
#define sec_setbits32 setbits_le32