rename CFG_ENV macros to CONFIG_ENV
[platform/kernel/u-boot.git] / board / zeus / zeus.c
index 4ab853f..8e4c0e2 100644 (file)
@@ -150,8 +150,8 @@ int misc_init_r(void)
 
        /* Env protection ON by default */
        (void)flash_protect(FLAG_PROTECT_SET,
-                           CFG_ENV_ADDR_REDUND,
-                           CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1,
+                           CONFIG_ENV_ADDR_REDUND,
+                           CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1,
                            &flash_info[0]);
 
        return 0;
@@ -208,56 +208,11 @@ static u32 detect_sdram_size(void)
        return size;
 }
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        return detect_sdram_size();
 }
 
-#if defined(CFG_DRAM_TEST)
-int testdram(void)
-{
-       unsigned long *mem = (unsigned long *)0;
-       const unsigned long kend = (1024 / sizeof(unsigned long));
-       unsigned long k, n;
-       unsigned long msr;
-       unsigned long total_kbytes;
-
-       total_kbytes = detect_sdram_size();
-
-       msr = mfmsr();
-       mtmsr(msr & ~(MSR_EE));
-
-       for (k = 0; k < total_kbytes ;
-            ++k, mem += (1024 / sizeof(unsigned long))) {
-               if ((k & 1023) == 0) {
-                       printf("%3d MB\r", k / 1024);
-               }
-
-               memset(mem, 0xaaaaaaaa, 1024);
-               for (n = 0; n < kend; ++n) {
-                       if (mem[n] != 0xaaaaaaaa) {
-                               printf("SDRAM test fails at: %08x\n",
-                                      (uint) & mem[n]);
-                               return 1;
-                       }
-               }
-
-               memset(mem, 0x55555555, 1024);
-               for (n = 0; n < kend; ++n) {
-                       if (mem[n] != 0x55555555) {
-                               printf("SDRAM test fails at: %08x\n",
-                                      (uint) & mem[n]);
-                               return 1;
-                       }
-               }
-       }
-       printf("SDRAM test passes\n");
-       mtmsr(msr);
-
-       return 0;
-}
-#endif
-
 static int default_env_var(char *buf, char *var)
 {
        char *ptr;
@@ -294,12 +249,12 @@ static int restore_default(void)
         * Unprotect and erase environment area
         */
        flash_protect(FLAG_PROTECT_CLEAR,
-                     CFG_ENV_ADDR_REDUND,
-                     CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1,
+                     CONFIG_ENV_ADDR_REDUND,
+                     CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1,
                      &flash_info[0]);
 
-       flash_sect_erase(CFG_ENV_ADDR_REDUND,
-                        CFG_ENV_ADDR_REDUND + 2*CFG_ENV_SECT_SIZE - 1);
+       flash_sect_erase(CONFIG_ENV_ADDR_REDUND,
+                        CONFIG_ENV_ADDR_REDUND + 2*CONFIG_ENV_SECT_SIZE - 1);
 
        /*
         * Now restore default environment from U-Boot image
@@ -325,7 +280,7 @@ static int restore_default(void)
        } else {
                crc = crc32(0, (u8 *)(buf + 4), FACTORY_RESET_ENV_SIZE - 4);
                if (crc != *(u32 *)buf) {
-                       printf("ERROR: crc mismatch %08lx %08lx\n", crc, *(u32 *)buf);
+                       printf("ERROR: crc mismatch %08x %08x\n", crc, *(u32 *)buf);
                        return -1;
                }