memsize: Fix for bug in memory sizing code

The original memory sizing code in get_ram_size clobbers the word
at the base address, but forgets to restore it.

Signed-off-by: Iwo Mergler <Iwo.Mergler@netcommwireless.com>
This commit is contained in:
Iwo Mergler 2012-09-09 20:16:58 +00:00 committed by Tom Rini
parent 78b2de802f
commit b8496cced8
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ long get_ram_size(long *base, long maxsize)
}
return (0);
}
*addr = save[i];
for (cnt = 1; cnt < maxsize / sizeof (long); cnt <<= 1) {
addr = base + cnt; /* pointer arith! */