Skip to content
Snippets Groups Projects
Commit 4204298d authored by Heiko Schocher's avatar Heiko Schocher Committed by Wolfgang Denk
Browse files

post, memorytest: add support for none powerpc archs


change bd->bi_memsize to gd->ram_size, as this is defined
on all archs, so this post test can used on none powerpc
archs too.

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
cc: Wolfgang Denk <hs@denx.de>
cc: Mike Frysinger <vapier@gentoo.org>
parent 90ea6015
No related branches found
No related tags found
No related merge requests found
......@@ -452,13 +452,17 @@ static int memory_post_tests (unsigned long start, unsigned long size)
return ret;
}
/*
* !! this is only valid, if you have contiguous memory banks !!
*/
__attribute__((weak))
int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset)
{
bd_t *bd = gd->bd;
*vstart = CONFIG_SYS_SDRAM_BASE;
*size = (bd->bi_memsize >= 256 << 20 ?
256 << 20 : bd->bi_memsize) - (1 << 20);
*size = (gd->ram_size >= 256 << 20 ?
256 << 20 : gd->ram_size) - (1 << 20);
/* Limit area to be tested with the board info struct */
if ((*vstart) + (*size) > (ulong)bd)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment