diff options
author | David Hendricks <dhendrix@chromium.org> | 2014-06-27 13:25:02 -0700 |
---|---|---|
committer | Marc Jones <marc.jones@se-eng.com> | 2015-01-04 00:45:22 +0100 |
commit | cab19911ff54f5ffa3cd140a6871755140a768c8 (patch) | |
tree | ad29d85cf4f66e31ddb8d93cbde48276511b0ec9 /src/soc/qualcomm | |
parent | 11aaf1f42ad8035c2870dc50852437f5e8863061 (diff) |
ipq806x: Fix casting in cbmem_top() so >=2GB can be used
This explicitly casts CONFIG_SYS_SDRAM_BASE to an unsigned type so
we don't get compilation errors when increasing CONFIG_DRAM_SIZE_MB.
BUG=chrome-os-partner:29871
BRANCH=storm
TEST=compilation no longer fails with DRAM_SIZE set to 1024
Original-Signed-off-by: David Hendricks <dhendrix@chromium.org>
Original-Change-Id: I9717c39d87682d43ec4e7a4042d9b559a1d7eedb
Original-Reviewed-on: https://chromium-review.googlesource.com/206010
Original-Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 178db896346ae8cbc5ddec5373a83688f32c62ba)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Change-Id: I68c11d398820684ad928bdfdd74f7a6885247333
Reviewed-on: http://review.coreboot.org/8059
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/qualcomm')
-rw-r--r-- | src/soc/qualcomm/ipq806x/cbmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/soc/qualcomm/ipq806x/cbmem.c b/src/soc/qualcomm/ipq806x/cbmem.c index b175d6a543..ecb02e47e8 100644 --- a/src/soc/qualcomm/ipq806x/cbmem.c +++ b/src/soc/qualcomm/ipq806x/cbmem.c @@ -18,8 +18,10 @@ */ #include <cbmem.h> +#include <stddef.h> void *cbmem_top(void) { - return (void *)(CONFIG_SYS_SDRAM_BASE + (CONFIG_DRAM_SIZE_MB << 20)); + return (void *)((uintptr_t)CONFIG_SYS_SDRAM_BASE + + (CONFIG_DRAM_SIZE_MB << 20)); } |