浏览代码

nitrogen: Use unsigned long to specify the total RAM size

When building for the nitrogen boards with 2GiB the following warning happens:

nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]

2GiB can not fit in 32-bits, so use ulong instead.

Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
fabio.estevam@freescale.com 12 年之前
父节点
当前提交
19a0f7fa27
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      board/boundary/nitrogen6x/nitrogen6x.c

+ 1 - 1
board/boundary/nitrogen6x/nitrogen6x.c

@@ -86,7 +86,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-	gd->ram_size = CONFIG_DDR_MB * 1024 * 1024;
+	gd->ram_size = ((ulong)CONFIG_DDR_MB * 1024 * 1024);
 
 	return 0;
 }