rename CFG_ENV macros to CONFIG_ENV
[platform/kernel/u-boot.git] / board / o2dnt / flash.c
index 186e0d2..1cf78c7 100644 (file)
@@ -103,12 +103,12 @@ unsigned long flash_init (void)
                        flash_get_info(CFG_MONITOR_BASE));
 #endif
 
-#ifdef CFG_ENV_IS_IN_FLASH
+#ifdef CONFIG_ENV_IS_IN_FLASH
        /* ENV protection ON by default */
        flash_protect(FLAG_PROTECT_SET,
-                       CFG_ENV_ADDR,
-                       CFG_ENV_ADDR+CFG_ENV_SIZE-1,
-                       flash_get_info(CFG_ENV_ADDR));
+                       CONFIG_ENV_ADDR,
+                       CONFIG_ENV_ADDR+CONFIG_ENV_SIZE-1,
+                       flash_get_info(CONFIG_ENV_ADDR));
 #endif
 
 
@@ -154,7 +154,7 @@ void flash_print_info (flash_info_t *info)
        int i;
        uchar *boottype;
        uchar *bootletter;
-       uchar *fmt;
+       char *fmt;
        uchar botbootletter[] = "B";
        uchar topbootletter[] = "T";
        uchar botboottype[] = "bottom boot sector";
@@ -411,7 +411,7 @@ static int write_data (flash_info_t *info, FPWV *dest, FPW data)
 
        /* Check if Flash is (sufficiently) erased */
        if ((*addr & data) != data) {
-               printf ("not erased at %08lx (%lx)\n", (ulong) addr, *addr);
+               printf ("not erased at %08lx (%x)\n", (ulong) addr, *addr);
                return (2);
        }
        /* Disable interrupts which might cause a timeout here */
@@ -585,4 +585,3 @@ static unsigned char intel_sector_protected (flash_info_t *info, ushort sector)
 
        return ret;
 }
-