rename CFG_ENV macros to CONFIG_ENV
[platform/kernel/u-boot.git] / board / icecube / flash.c
index 713011c..0aa78eb 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 
+#ifndef CONFIG_FLASH_CFI_DRIVER
 flash_info_t   flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips        */
 
 /* NOTE - CONFIG_FLASH_16BIT means the CPU interface is 16-bit, it
@@ -87,12 +88,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
 
 
@@ -489,3 +490,4 @@ static int write_word_amd (flash_info_t *info, FPWV *dest, FPW data)
 
        return (res);
 }
+#endif /*CONFIG_FLASH_CFI_DRIVER*/