]> git.sur5r.net Git - u-boot/blobdiff - board/esd/dasa_sim/flash.c
spl: Add support for common libraries and drivers
[u-boot] / board / esd / dasa_sim / flash.c
index 2574eac7fdc848f6d392629ee4e381922442adb7..d6a773797514226432d69c9af666dfcc59b80b07 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <ppc4xx.h>
+#include <asm/ppc4xx.h>
 #include <asm/processor.h>
 
 /*
@@ -43,11 +43,11 @@ static void flash_get_offsets (ulong base, flash_info_t *info);
 unsigned long flash_init (void)
 {
        unsigned long size_b0;
-        int i;
-        unsigned long base_b0;
+       int i;
+       unsigned long base_b0;
 
        /* 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;
        }
 
@@ -60,18 +60,18 @@ unsigned long flash_init (void)
                        size_b0, size_b0<<20);
        }
 
-        /* Setup offsets */
-        flash_get_offsets (-size_b0, &flash_info[0]);
+       /* Setup offsets */
+       flash_get_offsets (-size_b0, &flash_info[0]);
 
-        base_b0 = -size_b0;
+       base_b0 = -size_b0;
 
-        /* Monitor protection ON by default */
-        (void)flash_protect(FLAG_PROTECT_SET,
-                            -CFG_MONITOR_LEN,
-                            0xffffffff,
-                            &flash_info[0]);
+       /* Monitor protection ON by default */
+       (void)flash_protect(FLAG_PROTECT_SET,
+                           -monitor_flash_len,
+                           0xffffffff,
+                           &flash_info[0]);
 
-        flash_info[0].size = size_b0;
+       flash_info[0].size = size_b0;
 
        return (size_b0);
 }