From 7eea545bad47d3aed8782175c965b15ca65597cc Mon Sep 17 00:00:00 2001 From: Sam Nelson Date: Sun, 21 Oct 2018 16:42:47 -0400 Subject: [PATCH] am65xx: Fix Compilation warnings on int to pointer conversion Signed-off-by: Sam Nelson --- packages/ti/sdo/ipc/family/am65xx/InterruptHost.c | 4 ++-- packages/ti/sdo/ipc/family/am65xx/InterruptR5f.c | 4 ++-- packages/ti/sdo/ipc/family/am65xx/NotifyDriverMbx.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/ti/sdo/ipc/family/am65xx/InterruptHost.c b/packages/ti/sdo/ipc/family/am65xx/InterruptHost.c index 8c75141..7ca78e9 100644 --- a/packages/ti/sdo/ipc/family/am65xx/InterruptHost.c +++ b/packages/ti/sdo/ipc/family/am65xx/InterruptHost.c @@ -48,8 +48,8 @@ #include "package/internal/InterruptHost.xdc.h" /* Register access method. */ -#define REG16(A) (*(volatile UInt16 *) (A)) -#define REG32(A) (*(volatile UInt32 *) (A)) +#define REG16(A) (*(volatile UInt16 *) ((uintptr_t)A)) +#define REG32(A) (*(volatile UInt32 *) ((uintptr_t)A)) #define PROCID(IDX) (InterruptHost_procIdTable[(IDX)]) #define MBX_TABLE_IDX(SRC, DST) ((PROCID(SRC) * InterruptHost_NUM_CORES) + \ diff --git a/packages/ti/sdo/ipc/family/am65xx/InterruptR5f.c b/packages/ti/sdo/ipc/family/am65xx/InterruptR5f.c index 7a6ffb5..158316c 100644 --- a/packages/ti/sdo/ipc/family/am65xx/InterruptR5f.c +++ b/packages/ti/sdo/ipc/family/am65xx/InterruptR5f.c @@ -49,8 +49,8 @@ #include "package/internal/InterruptR5f.xdc.h" /* Register access method. */ -#define REG16(A) (*(volatile UInt16 *) (A)) -#define REG32(A) (*(volatile UInt32 *) (A)) +#define REG16(A) (*(volatile UInt16 *) ((uintptr_t)A)) +#define REG32(A) (*(volatile UInt32 *) ((uintptr_t)A)) #define PROCID(IDX) (InterruptR5f_procIdTable[(IDX)]) #define MBX_TABLE_IDX(SRC, DST) ((PROCID(SRC) * InterruptR5f_NUM_CORES) + \ diff --git a/packages/ti/sdo/ipc/family/am65xx/NotifyDriverMbx.c b/packages/ti/sdo/ipc/family/am65xx/NotifyDriverMbx.c index 4079163..dd9bb42 100644 --- a/packages/ti/sdo/ipc/family/am65xx/NotifyDriverMbx.c +++ b/packages/ti/sdo/ipc/family/am65xx/NotifyDriverMbx.c @@ -61,8 +61,8 @@ #define TEST_BIT(num,pos) ((num) & (1u << (pos))) /* register access methods */ -#define REG16(A) (*(volatile UInt16 *)(A)) -#define REG32(A) (*(volatile UInt32 *)(A)) +#define REG16(A) (*(volatile UInt16 *)((uintptr_t)A)) +#define REG32(A) (*(volatile UInt32 *)((uintptr_t)A)) #define MAILBOX_FIFOLENGTH 4 #define PROCID(idx) (NotifyDriverMbx_procIdTable[(idx)]) -- 2.39.2