summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattis fjallstrom <mattis@acm.org>2014-10-30 18:34:43 -0700
committermattis fjallstrom <mattis@acm.org>2014-10-30 18:34:43 -0700
commitdd3a236bfa7b3d026dd81d732b1eff4c4c536ddc (patch)
treeb9ce369ce8f50f548d1bb3e7225b697ebb13745d
parent40e19b0800a36d57fb65eb0ebd521911feca67c2 (diff)
downloadolio-uboot-2014.01-dd3a236bfa7b3d026dd81d732b1eff4c4c536ddc.tar.xz
olio-uboot-2014.01-dd3a236bfa7b3d026dd81d732b1eff4c4c536ddc.zip
Allow building for software ECC from the commandline - flag is SW_ECC=1.
Change-Id: Ibb9d5084b21e1d6b518737cf9b4a231373cad1b3
-rw-r--r--Makefile9
-rw-r--r--include/configs/omap3_h1.h12
2 files changed, 18 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 47a03e34e..78dc12582 100644
--- a/Makefile
+++ b/Makefile
@@ -541,6 +541,15 @@ GEN_UBOOT = \
-Map u-boot.map -o u-boot
endif
+#
+# The u-boot image for olio H1 needs to be built with ECC HW. I'd like to
+# have a commandline option for the ECC, since I need two different builds for this.
+#
+
+ifdef SW_ECC
+CFLAGS += -DSW_ECC
+endif
+
$(obj)u-boot: depend \
$(SUBDIR_TOOLS) $(OBJS) $(LIBS) $(obj)u-boot.lds
$(GEN_UBOOT)
diff --git a/include/configs/omap3_h1.h b/include/configs/omap3_h1.h
index 357318fda..0c368ec32 100644
--- a/include/configs/omap3_h1.h
+++ b/include/configs/omap3_h1.h
@@ -327,11 +327,17 @@
10, 11, 12, 13}
#define CONFIG_SYS_NAND_ECCSIZE 512
#define CONFIG_SYS_NAND_ECCBYTES 3
-#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_SW
+
+#ifdef SW_ECC
+#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_SW
+#else
+#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW
+#endif
+
/* #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW */
-#define CONFIG_BCH
+/* #define CONFIG_BCH */
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
/*
* 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM