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 on longer fails with DRAM_SIZE set to 1024 Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: I9717c39d87682d43ec4e7a4042d9b559a1d7eedb Reviewed-on: https://chromium-review.googlesource.com/206010 Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
This commit is contained in:
parent
de4310af6f
commit
178db89634
1 changed files with 3 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue