Commit d02fbc7d authored by Aymen Sghaier's avatar Aymen Sghaier

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: default avatarAymen Sghaier <aymen.sghaier@nxp.com>
parent 1fc92e6e
/*
* Copyright (C) 2010-2015 Freescale Semiconductor, Inc.
* Copyright 2018 NXP
*
* SPDX-License-Identifier: GPL-2.0+
*/
......@@ -666,7 +667,8 @@ static int validate_ivt(int ivt_offset, ulong start_addr)
(ivt_hdr->par & HAB_MAJ_MASK) == HAB_MAJ_VER) && \
(ivt_initial->entry != 0x0) && \
(ivt_initial->reserved1 == 0x0) && \
(ivt_initial->self == (uint32_t)ivt_initial) && \
(ivt_initial->self == \
(uint32_t)((ulong)ivt_initial & 0xffffffff)) && \
(ivt_initial->csf != 0x0) && \
(ivt_initial->reserved2 == 0x0)) {
/* Report boot failure if DCD pointer is found in IVT */
......
/*
* Copyright 2008-2014 Freescale Semiconductor, Inc.
* Copyright 2018 NXP
*
* SPDX-License-Identifier: GPL-2.0+
*
......@@ -28,10 +29,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];
......
......@@ -14,8 +14,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
......
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