]> git.sur5r.net Git - u-boot/blobdiff - board/evb64260/sdram_init.c
spear: fix build errors for spear3xx/spear600 platforms
[u-boot] / board / evb64260 / sdram_init.c
index d9318d5e605552f4ea66ab8b4279b73d211515f8..e2f07699c3df1ccea1042d38193918de03757056 100644 (file)
@@ -35,6 +35,8 @@
 #include "i2c.h"
 #include "64260.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* #define     DEBUG */
 #define        MAP_PCI
 
@@ -199,7 +201,6 @@ static int check_dimm (uchar slot, sdram_info_t * info)
  * the array which is passed in with the relevant information */
 static int check_dimm (uchar slot, sdram_info_t * info)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        uchar addr = slot == 0 ? DIMM0_I2C_ADDR : DIMM1_I2C_ADDR;
        int ret;
        uchar rows, cols, sdram_banks, supp_cal, width, cal_val;
@@ -299,7 +300,7 @@ static int check_dimm (uchar slot, sdram_info_t * info)
 
        DP (printf ("tpar set to: %d\n", info->tpar));
 
-#ifdef CFG_BROKEN_CL2
+#ifdef CONFIG_SYS_BROKEN_CL2
        if (info->tpar == 2) {
                info->tpar = 3;
                DP (printf ("tpar fixed-up to: %d\n", info->tpar));
@@ -341,11 +342,7 @@ static int setup_sdram_common (sdram_info_t info[2])
                        tras_clocks = info[0].tras_clocks;
                if (!info[0].registered)
                        registered = 0;
-               if (info[0].ecc != 2indent: Standard input:491: Warning:old style assignment ambiguity in "=*".  Assuming "= *"
-
-indent: Standard input:492: Warning:old style assignment ambiguity in "=*".  Assuming "= *"
-
-)
+               if (info[0].ecc != 2)
                        ecc = 0;
        }
 
@@ -527,7 +524,7 @@ static long int dram_size (long int *base, long int maxsize)
 
 /* U-Boot interface function to SDRAM init - this is where all the
  * controlling logic happens */
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        ulong checkbank[4] = {[0 ... 3] = 0 };
        int bank_no;
@@ -601,7 +598,7 @@ long int initdram (int board_type)
         *         limitation: we only support 256M per bank due to
         *         us only having 1 BAT for all DRAM
         */
-       for (bank_no = 0; bank_no < CFG_DRAM_BANKS; bank_no++) {
+       for (bank_no = 0; bank_no < CONFIG_SYS_DRAM_BANKS; bank_no++) {
                /* skip over banks that are not populated */
                if (!checkbank[bank_no])
                        continue;
@@ -620,7 +617,7 @@ long int initdram (int board_type)
         *         space.
         */
        dimm_info[0].banks = dimm_info[1].banks = 0;
-       for (bank_no = 0; bank_no < CFG_DRAM_BANKS; bank_no++) {
+       for (bank_no = 0; bank_no < CONFIG_SYS_DRAM_BANKS; bank_no++) {
                if (!checkbank[bank_no])
                        continue;