[U-Boot-Users] a small problem
Yabo Ding
bobfree at bonbon.net
Fri Jun 27 05:47:54 CEST 2003
In post/memory.c file
int memory_post_test (int flags)
{
int ret = 0;
DECLARE_GLOBAL_DATA_PTR;
bd_t *bd = gd->bd;
unsigned long memsize = (bd->bi_memsize >= 256 << 20 ?
256 << 20 : bd->bi_memsize) - (1 << 20);
if (flags & POST_POWERFAIL) {
ret = memory_post_tests (CFG_SDRAM_BASE, memsize);
} else { /* POST_POWERNORMAL */
unsigned long i;
for (i = 0; i < (memsize >> 20) && ret == 0; i++) {
if (ret == 0)
ret = memory_post_tests (i << 20, 0x800);
if (ret == 0)
ret = memory_post_tests ((i << 20) + 0xff800, 0x800);
}
}
return ret;
}
I think the line should be:
unsigned long memsize = (bd->bi_memsize >= 257 << 20 ?
256 << 20 : bd->bi_memsize) - (1 << 20);
Yabo Ding
bobfree at bonbon.net
More information about the U-Boot
mailing list