]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/xes/xpedite517x/xpedite517x.c
mpc85xx boards: initdram() cleanup/bugfix
[karo-tx-uboot.git] / board / xes / xpedite517x / xpedite517x.c
index 0f7fa6c43abe3767bb2dcb8bcc04bdc2b6590632..572a9080047eee15d0a273ab6fac341bbf093fb6 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/fsl_ddr_sdram.h>
 #include <asm/mmu.h>
 #include <asm/io.h>
 #include <fdt_support.h>
@@ -71,6 +72,18 @@ int board_early_init_r(void)
        return 0;
 }
 
+phys_size_t initdram(int board_type)
+{
+       phys_size_t dram_size = fsl_ddr_sdram();
+
+#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
+       /* Initialize and enable DDR ECC */
+       ddr_enable_ecc(dram_size);
+#endif
+
+       return dram_size;
+}
+
 #if defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {