]> git.sur5r.net Git - u-boot/blobdiff - post/memory.c
Merge with /home/wd/git/u-boot/custodian/u-boot-ppc4xx
[u-boot] / post / memory.c
index 0dac858ea49c7640c4d05356015a3b53d4184229..a2c088bad8d5f3cf274b4e62085e9b664f96cedd 100644 (file)
 
 #if CONFIG_POST & CFG_POST_MEMORY
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * Define INJECT_*_ERRORS for testing error detection in the presence of
  * _good_ hardware.
@@ -224,7 +226,7 @@ const unsigned long long otherpattern = 0x0123456789abcdefULL;
 
 static int memory_post_dataline(unsigned long long * pmem)
 {
-       unsigned long long temp64;
+       unsigned long long temp64 = 0;
        int num_patterns = sizeof(pattern)/ sizeof(pattern[0]);
        int i;
        unsigned int hi, lo, pathi, patlo;
@@ -418,14 +420,14 @@ static int memory_post_tests (unsigned long start, unsigned long size)
        int ret = 0;
 
        if (ret == 0)
-               ret = memory_post_dataline ((long long *)start);
+               ret = memory_post_dataline ((unsigned long long *)start);
        WATCHDOG_RESET ();
        if (ret == 0)
-               ret = memory_post_addrline ((long *)start, (long *)start, size);
+               ret = memory_post_addrline ((ulong *)start, (ulong *)start, size);
        WATCHDOG_RESET ();
        if (ret == 0)
-               ret = memory_post_addrline ((long *)(start + size - 8),
-                                           (long *)start, size);
+               ret = memory_post_addrline ((ulong *)(start + size - 8),
+                                           (ulong *)start, size);
        WATCHDOG_RESET ();
        if (ret == 0)
                ret = memory_post_test1 (start, size, 0x00000000);
@@ -455,7 +457,6 @@ static int memory_post_tests (unsigned long start, unsigned long size)
 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);