summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-09-24 20:37:30 -0700
committerYe Li <ye.li@nxp.com>2018-09-29 00:35:23 -0700
commitbbc39e56bbce703f40d676587ca59129766370eb (patch)
tree3558ce91906a12df542e28137c44c7bea0801922
parenta461844b640488ddde954d492c74abb5e30738d1 (diff)
MLK-19691 mx7ulp_evk: Fix build warning
Fix the build warning below on iMX7ULP EVK board. The root cause is compiler uses integer for PHYS_SDRAM 0x60000000 when calculating the value for CONFIG_SYS_MEMTEST_END. So we add "ul" postfix to define its type to ulong. In file included from include/config.h:6:0, from include/common.h:21, from cmd/mem.c:14: cmd/mem.c: In function ‘do_mem_mtest’: include/configs/mx7ulp_evk.h:91:63: warning: integer overflow in expression [-Woverflow] #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + (PHYS_SDRAM_SIZE >> 1)) ^ cmd/mem.c:877:8: note: in expansion of macro ‘CONFIG_SYS_MEMTEST_END’ end = CONFIG_SYS_MEMTEST_END; Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 5eb040227b2d591acfd04d75a234ede1f78a198a)
-rw-r--r--include/configs/mx7ulp_evk.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index a1d0bd3667..bbb7cb287d 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -80,7 +80,7 @@
/* Physical Memory Map */
#define CONFIG_NR_DRAM_BANKS 1
-#define PHYS_SDRAM 0x60000000
+#define PHYS_SDRAM 0x60000000ul
#define PHYS_SDRAM_SIZE SZ_1G
#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM