]> git.sur5r.net Git - u-boot/commitdiff
board: ks2: Enable ECC using detected DDR size
authorLokesh Vutla <lokeshvutla@ti.com>
Sat, 27 Aug 2016 11:49:15 +0000 (17:19 +0530)
committerTom Rini <trini@konsulko.com>
Sun, 2 Oct 2016 00:05:05 +0000 (20:05 -0400)
EEC is being enabled based on the ddr size populated by SPD data.
But not all keystone platforms have SPD data to detect ddr3 size.
So, enable ECC using the detected DDR size.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/ti/ks2_evm/board.c

index 1de7df00b478ceedb5dd27cf95a1c689a94ba3dc..03254e1497684e263d175f7558c80de5b4389d5f 100644 (file)
@@ -50,6 +50,9 @@ int dram_init(void)
 
        if (ddr3_size)
                ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size);
+       else
+               ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, gd->ram_size >> 30);
+
        return 0;
 }