ARM: OMAP5: Align memory used for testing to the power of 2
get_ram_size checks the given memory range for valid ram, but expects the size of memory to be aligned to the power of 2. In case of OMAP5 evm board the memory available is 2GB - 16MB(used for TRAP section) = 2032MB. So always ensure that the size of memory used for testing is aligned to the power of 2. Signed-off-by: R Sricharan <r.sricharan@ti.com>
This commit is contained in:
parent
77efdeb758
commit
41321fd4d6
@ -1161,6 +1161,9 @@ void sdram_init(void)
|
||||
/* Do some testing after the init */
|
||||
if (!in_sdram) {
|
||||
size_prog = omap_sdram_size();
|
||||
size_prog = log_2_n_round_down(size_prog);
|
||||
size_prog = (1 << size_prog);
|
||||
|
||||
size_detect = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
|
||||
size_prog);
|
||||
/* Compare with the size programmed */
|
||||
|
Loading…
Reference in New Issue
Block a user