]> git.sur5r.net Git - u-boot/commitdiff
arm: mvebu: Display ECC enabled / disabled upon bootup
authorStefan Roese <sr@denx.de>
Mon, 3 Aug 2015 11:15:31 +0000 (13:15 +0200)
committerLuka Perkov <luka.perkov@sartura.hr>
Mon, 17 Aug 2015 16:49:19 +0000 (18:49 +0200)
This patch adds "(ECC enabled)" or "(ECC disabled)" to the DRAM
bootup text. Making it easier for board with SPD DIMM's to see,
if ECC is enabled or not.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
arch/arm/mach-mvebu/dram.c

index 7a5840c8b12fa4dfd866c45628fa5944032c97cf..600dc0914ae9921cae441a8fad339921cf8e0a42 100644 (file)
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 
+#ifdef CONFIG_SYS_MVEBU_DDR_A38X
+#include "../../../drivers/ddr/marvell/a38x/ddr3_init.h"
+#endif
+#ifdef CONFIG_SYS_MVEBU_DDR_AXP
+#include "../../../drivers/ddr/marvell/axp/ddr3_init.h"
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 struct sdram_bank {
@@ -140,3 +147,15 @@ void dram_init_banksize(void)
 {
        dram_init();
 }
+
+void board_add_ram_info(int use_default)
+{
+       u32 reg;
+
+       reg = reg_read(REG_SDRAM_CONFIG_ADDR);
+       if (reg & (1 << REG_SDRAM_CONFIG_ECC_OFFS))
+               printf(" (ECC");
+       else
+               printf(" (ECC not");
+       printf(" enabled)");
+}