]> git.sur5r.net Git - u-boot/commitdiff
memsize: Fix for bug in memory sizing code
authorIwo Mergler <Iwo.Mergler@netcommwireless.com>
Sun, 9 Sep 2012 20:16:58 +0000 (20:16 +0000)
committerTom Rini <trini@ti.com>
Tue, 18 Sep 2012 19:01:51 +0000 (12:01 -0700)
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>
common/memsize.c

index 963e4f35b18059c3d79b30c04ab595281c37273e..74cf075aff773aeeb2288c2db50899f10091b4ea 100644 (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! */