]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/ti/ks2_evm/board.c
Merge branch 'master' of git://git.denx.de/u-boot-sh
[karo-tx-uboot.git] / board / ti / ks2_evm / board.c
index 899178606383da9d9b2038c20f853c945fdd15a8..ff7bc4bb18d695feac087803a04ad37a881a1430 100644 (file)
@@ -40,6 +40,7 @@ int dram_init(void)
        gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
                                    CONFIG_MAX_RAM_BANK_SIZE);
        aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs);
+       ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE);
        return 0;
 }
 
@@ -121,7 +122,6 @@ void ft_board_setup(void *blob, bd_t *bd)
        int nbanks;
        u64 size[2];
        u64 start[2];
-       char name[32];
        int nodeoffset;
        u32 ddr3a_size;
        int unitrd_fixup = 0;
@@ -157,15 +157,13 @@ void ft_board_setup(void *blob, bd_t *bd)
        }
 
        /* reserve memory at start of bank */
-       sprintf(name, "mem_reserve_head");
-       env = getenv(name);
+       env = getenv("mem_reserve_head");
        if (env) {
                start[0] += ustrtoul(env, &endp, 0);
                size[0] -= ustrtoul(env, &endp, 0);
        }
 
-       sprintf(name, "mem_reserve");
-       env = getenv(name);
+       env = getenv("mem_reserve");
        if (env)
                size[0] -= ustrtoul(env, &endp, 0);
 
@@ -254,5 +252,7 @@ void ft_board_setup_ex(void *blob, bd_t *bd)
                        reserve_start += 2;
                }
        }
+
+       ddr3_check_ecc_int(KS2_DDR3A_EMIF_CTRL_BASE);
 }
 #endif