]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/amcc/ebony/flash.c
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / board / amcc / ebony / flash.c
index e8fbbc493e8126e1cb55ff3b131268acee0cacdf..8fe3ba1b8f0df4777e97dde510a73583c3c95f0d 100755 (executable)
@@ -50,7 +50,7 @@
 #define     FLASH_ONBD_N_VAL        2
 #define     FLASH_SRAM_SEL_VAL      1
 
-static unsigned long flash_addr_table[8][CFG_MAX_FLASH_BANKS] = {
+static unsigned long flash_addr_table[8][CONFIG_SYS_MAX_FLASH_BANKS] = {
        {0xffc00000, 0xffe00000, 0xff880000},   /* 0:000: configuraton 3 */
        {0xffc00000, 0xffe00000, 0xff800000},   /* 1:001: configuraton 4 */
        {0xffc00000, 0xffe00000, 0x00000000},   /* 2:010: configuraton 7 */
@@ -74,8 +74,8 @@ static ulong flash_get_size(vu_long * addr, flash_info_t * info);
 unsigned long flash_init(void)
 {
        unsigned long total_b = 0;
-       unsigned long size_b[CFG_MAX_FLASH_BANKS];
-       unsigned char *fpga_base = (unsigned char *)CFG_FPGA_BASE;
+       unsigned long size_b[CONFIG_SYS_MAX_FLASH_BANKS];
+       unsigned char *fpga_base = (unsigned char *)CONFIG_SYS_FPGA_BASE;
        unsigned char switch_status;
        unsigned short index = 0;
        int i;
@@ -98,7 +98,7 @@ unsigned long flash_init(void)
        DEBUGF("FLASH: Index: %d\n", index);
 
        /* Init: no FLASHes known */
-       for (i = 0; i < CFG_MAX_FLASH_BANKS; ++i) {
+       for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
                flash_info[i].flash_id = FLASH_UNKNOWN;
                flash_info[i].sector_count = -1;
                flash_info[i].size = 0;
@@ -121,15 +121,15 @@ unsigned long flash_init(void)
                }
 
                /* Monitor protection ON by default */
-               (void)flash_protect(FLAG_PROTECT_SET, CFG_MONITOR_BASE,
-                                   CFG_MONITOR_BASE + CFG_MONITOR_LEN - 1,
+               (void)flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE,
+                                   CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN - 1,
                                    &flash_info[2]);
-#ifdef CFG_ENV_IS_IN_FLASH
-               (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR,
-                                   CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1,
+#ifdef CONFIG_ENV_IS_IN_FLASH
+               (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR,
+                                   CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
                                    &flash_info[2]);
-               (void)flash_protect(FLAG_PROTECT_SET, CFG_ENV_ADDR_REDUND,
-                                   CFG_ENV_ADDR_REDUND + CFG_ENV_SECT_SIZE - 1,
+               (void)flash_protect(FLAG_PROTECT_SET, CONFIG_ENV_ADDR_REDUND,
+                                   CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1,
                                    &flash_info[2]);
 #endif