mtd: nand: omap: add CONFIG_NAND_OMAP_ECCSCHEME for selection of ecc-scheme
Dear Pekon,
thanks for your mail. This ECC topic is of some complexity. :(
I am close to solve a huge problem here, switching boards from 1bit-SW-ECC to BCH4.
The only missing part is, that OMAP xloader and uboot calculates the BCH4 ECC values than Sitara XLoader
(although the x-loader binaries are identical).
Main problem is not that this is different to Linux - this is not nice, but not a problem. I solved this by implementing a
second linux compatible BCH4 in uboot (which works on both platforms). Problem is, that BCH4 (as it is implemented in aragos xloader) seems not to work on OMAP3503.
And it is not understood by me, why this is not working, or what can the reason for this.
You suggestions address kernel/uboot changes. For this I have already a solution.
I am running into other troubles if I shift to your suggestions, and I can't see an improvement for
the xloader problem.
I know, nowadays the xloader is SPL and is derived from uboot. But I haven't the power to completely change everything again. Frankly speaking, I afraid another nightmare here. Unfortunatly TI doesn't have an newer SDK for OMAP3503/AM3703. Is it true, that in this Arago or TI SDK the only functional ECC scheme are 1 bit SW and 1 bit HW (for xloader)?
For me it seems (if you check my logs) that in xloader the omap_calculate_ecc_bch4() uses hardware GPMC registers. Main question: why this doens't work or give different results in OMAP?
The version I take over for uboot and kernel (according to Technical Note from Micron tn2971_software_bch_ecc_on_linux.pdf), this functions. The counterpart for this seems to me in bch.c encode_bch(), which seems to run completly independent on hardware.
Please understand my situation. At TI forum I asked since monthes with no real help. So I started my work and succeeded 90%.
Best regards
Steffen
Quoted 2 lines
Quoted 1 line
Quoted 1 line
"Gupta, Pekon" <[email protected]> schrieb am 21.11.13 um 06:12:
This patch adds new
CONFIG_NAND_OMAP_ECCSCHEME, replacing other
distributed
Quoted 4 lines
CONFIG_xxused for selecting NAND ecc-schemes.
This patch aims at solving following issues.1) Currently ecc-scheme is tied to SoC platform, which prevents user
to
Quoted 3 lines
select
other ecc-schemes also supported in hardware. like;
- most of OMAP3 SoC platforms use only 1-bit Hamming ecc-scheme,
inspite
Quoted 1 line
the fact that they can use higher ecc-schemes like 8-bit
ecc-schemes with
Quoted 1 line
software based error detection
(OMAP_ECC_BCH4_CODE_HW_DETECTION_SW).
Quoted 1 line
- most of AM33xx SoC plaforms use 8-bit BCH ecc-scheme for now, but
hardware
Quoted 3 lines
supports BCH16 ecc-scheme also.
2) Different platforms use different
CONFIG_xxto select ecc-schemes,
which
Quoted 2 lines
adds confusion for user while migrating platforms.
- *CONFIG_NAND_OMAP_ELM* which enables ELM hardware engine, selects
only
Quoted 3 lines
8-bit BCH ecc-scheme with h/w based error-correction
(OMAP_ECC_BCH8_CODE_HW)whereas ELM hardware engine supports other ecc-schemes also like;
BCH4,
Quoted 2 lines
and BCH16 (in future).
- *CONFIG_NAND_OMAP_BCH8* selects 8-bit BCH ecc-scheme with s/w
based error
Quoted 2 lines
correction (
OMAP_ECC_BCH8_CODE_HW_DETECTION_SW).
- *CONFIG_SPL_NAND_SOFTECC* selects 1-bit Hamming ecc-scheme using
s/w library
Quoted 2 lines
Thus adding new *CONFIG_NAND_OMAP_ECCSCHEME* de-couples ecc-scheme
dependency
Quoted 1 line
on SoC platform and NAND driver. And user can select ecc-scheme
independently
Quoted 2 lines
foreach board.
However, selection some hardware based ecc-schemes
(OMAP_ECC_BCHx_CODE_HW)
Quoted 2 lines
still
depends on presence of ELM hardware engine on SoC. (Refer
doc/README.nand)
Quoted 27 lines
Signed-off-by Pekon Gupta <[email protected]>--- doc/README.nand | 23 +++++++++++++++++++++++ doc/README.omap3 | 3 +-- drivers/mtd/nand/omap_gpmc.c | 13 ++++--------- include/configs/am335x_evm.h | 3 ++- include/configs/am335x_igep0033.h | 1 + include/configs/am3517_crane.h | 1 + include/configs/am3517_evm.h | 1 + include/configs/devkit8000.h | 1 + include/configs/mcx.h | 2 +- include/configs/omap3_beagle.h | 1 + include/configs/omap3_evm.h | 1 + include/configs/omap3_evm_quick_nand.h | 1 + include/configs/omap3_igep00x0.h | 1 + include/configs/omap3_overo.h | 1 + include/configs/siemens-am33x-common.h | 1 + include/configs/tam3517-common.h | 2 +- include/configs/tricorder.h | 2 +- 17 files changed, 43 insertions(+), 15 deletions(-)doc/README.nand +0
-0
doc/README.nand Platform specific options · line 198
Quoted 1 line
doc/README.nand +0
-0@@ -198,6 +198,29 @@ Platform specific options detection. However ECC calculation on such plaforms would
still be
Quoted 33 lines
doc/README.nand +23
-0done by GPMC controller. + CONFIG_NAND_OMAP_ECCSCHEME + On OMAP platforms, this CONFIG specifies NAND ECC scheme. + It can take following values: + OMAP_ECC_HAM1_CODE_SW + 1-bit Hamming code using software lib. + (for legacy devices only) + OMAP_ECC_HAM1_CODE_HW + 1-bit Hamming code using GPMC hardware. + (for legacy devices only) + OMAP_ECC_BCH4_CODE_HW_DETECTION_SW + 4-bit BCH code (unsupported) + OMAP_ECC_BCH4_CODE_HW + 4-bit BCH code (unsupported) + OMAP_ECC_BCH8_CODE_HW_DETECTION_SW + 8-bit BCH code with + - ecc calculation using GPMC hardware engine, + - error detection using software library. + - requires CONFIG_BCH to enable software BCH library + (For legacy device which do not have ELM h/w engine) + OMAP_ECC_BCH8_CODE_HW + 8-bit BCH code with + - ecc calculation using GPMC hardware engine, + - error detection using ELM hardware engine. NOTE: =====doc/README.omap3 +0
-0
doc/README.omap3 BCH8 · line 162
Quoted 2 lines
doc/README.omap3 +0
-0@@ -161,8 +161,7 @@ BCH8 To enable hardware assisted BCH8 (8-bit BCH [Bose, Chaudhuri,
Hocquenghem])
Quoted 5 lines
on
OMAP3 devices we can use the BCH library inlib/bch.c. To do so add
CONFIG_BCH
-to enable the library andCONFIG_NAND_OMAP_BCH8to to enable
hardware
doc/README.omap3
Quoted 3 lines
assisted
doc/README.omap3 +1
-1-syndrom generation to your board config. +and set CONFIG_NAND_OMAP_ECCSCHEME=5 (refer README.nand) for
selecting
Quoted 2 lines
BCH8_SW.
The NAND OOB layout is the same as in linux kernel, if the linux
kernel
Quoted 2 lines
BCH8
implementation for OMAP3 works for you so the u-boot version should
also.
Quoted 1 line
When you require the SPL to read with BCH8 there are two more
configs to
Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/mtd/nand/omap_gpmc.c
drivers/mtd/nand/omap_gpmc.c int board_nand_init(struct nand_chip *nand) · line 1008
Quoted 11 lines
index e6b289d..5e7e6b3 100644
drivers/mtd/nand/omap_gpmc.c +2
-2@@ -1004,18 +1004,13 @@ int board_nand_init(struct nand_chip *nand) nand->ecc.layout = &omap_ecclayout;/* select ECC scheme */ -#if defined(CONFIG_NAND_OMAP_ELM ) - err = omap_select_ecc_scheme(nand, OMAP_ECC_BCH8_CODE_HW, +#if defined(CONFIG_NAND_OMAP_ECCSCHEME ) + err = omap_select_ecc_scheme(nand,
CONFIG_NAND_OMAP_ECCSCHEME,
drivers/mtd/nand/omap_gpmc.c int board_nand_init(struct nand_chip *nand) · line 1009
Quoted 1 line
drivers/mtd/nand/omap_gpmc.c +0
-0CONFIG_SYS_NAND_PAGE_SIZE,
CONFIG_SYS_NAND_OOBSIZE);
drivers/mtd/nand/omap_gpmc.c int board_nand_init(struct nand_chip *nand) · line 1013
Quoted 4 lines
drivers/mtd/nand/omap_gpmc.c +0
-3-#elif defined(CONFIG_NAND_OMAP_BCH8 ) - err = omap_select_ecc_scheme(nand, OMAP_ECC_BCH8_CODE_HW_DETECTION_SW, - CONFIG_SYS_NAND_PAGE_SIZE,
CONFIG_SYS_NAND_OOBSIZE);
drivers/mtd/nand/omap_gpmc.c int board_nand_init(struct nand_chip *nand) · line 1014
Quoted 1 line
drivers/mtd/nand/omap_gpmc.c +0
-1-#elif !defined(CONFIG_SPL_BUILD) ||
defined(CONFIG_SPL_NAND_SOFTECC)
drivers/mtd/nand/omap_gpmc.c int board_nand_init(struct nand_chip *nand) · line 1012
Quoted 2 lines
drivers/mtd/nand/omap_gpmc.c +2
-0+#else +/* pagesize and oobsize are not required to configure sw
ecc-scheme
drivers/mtd/nand/omap_gpmc.c int board_nand_init(struct nand_chip *nand) · line 1020
Quoted 6 lines
drivers/mtd/nand/omap_gpmc.c +0
-3*/ err =omap_select_ecc_scheme (nand,OMAP_ECC_HAM1_CODE_SW ,0 ,0 ); -#else - err = omap_select_ecc_scheme(nand, OMAP_ECC_HAM1_CODE_HW, - CONFIG_SYS_NAND_PAGE_SIZE,
CONFIG_SYS_NAND_OOBSIZE);
Review
Quoted 4 lines
drivers/mtd/nand/omap_gpmc.c +0
-0#endif if (err) return err;(quoted diff) +0
-0
b/include/configs/am335x_evm.h
Review
Quoted 27 lines
index 4c79ddb..d75df92 100644
include/configs/am335x_evm.h +2
-1@@ -239,7 +239,8 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 14 - +#define CONFIG_SYS_NAND_ONFI_DETECTION +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000#endif include/configs/am335x_igep0033.h +1
-0@@ -264,6 +264,7 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 14 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE(quoted diff) +0
-0
b/include/configs/am3517_crane.h
Review
Quoted 12 lines
index 6fd3fb9..468fb43 100644
include/configs/am3517_crane.h +1
-0@@ -340,6 +340,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000(quoted diff) +0
-0
b/include/configs/am3517_evm.h
Review
Quoted 12 lines
index 7e9c55e..a3473b5 100644
include/configs/am3517_evm.h +1
-0@@ -334,6 +334,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000(quoted diff) +0
-0
b/include/configs/devkit8000.h
Quoted 24 lines
index 474a568..4f43ba9 100644
include/configs/devkit8000.h +1
-0@@ -327,6 +327,7 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 3 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASEinclude/configs/mcx.h +0
-1@@ -353,7 +353,6 @@#define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_NAND_SIMPLE -#define CONFIG_SPL_NAND_SOFTECC #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_LIBDISK_SUPPORT
include/configs/mcx.h line 394
Quoted 1 line
include/configs/mcx.h +0
-0@@ -395,6 +394,7 @@ 56, 57, 58, 59, 60, 61, 62,
63}
Review
Quoted 7 lines
include/configs/mcx.h +1
-0#define CONFIG_SYS_NAND_ECCSIZE 256#define CONFIG_SYS_NAND_ECCBYTES 3 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_SW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE(quoted diff) +0
-0
b/include/configs/omap3_beagle.h
Review
Quoted 12 lines
index bba39d4..9eab190 100644
include/configs/omap3_beagle.h +1
-0@@ -431,6 +431,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000(quoted diff) +0
-0
b/include/configs/omap3_evm.h
Review
Quoted 38 lines
index 3ace8bb..b7638fb 100644
include/configs/omap3_evm.h +1
-0@@ -107,6 +107,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000include/configs/omap3_evm_quick_nand.h +1
-0@@ -86,6 +86,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000include/configs/omap3_igep00x0.h +1
-0@@ -362,6 +362,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000#endif (quoted diff) +0
-0
b/include/configs/omap3_overo.h
Quoted 17 lines
index 84b4aee..e0f0262 100644
include/configs/omap3_overo.h +1
-0@@ -324,6 +324,7 @@ 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_HW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000include/configs/siemens-am33x-common.h +0
-0
include/configs/siemens-am33x-common.h line 201
Quoted 7 lines
include/configs/siemens-am33x-common.h +1
-0@@ -195,6 +195,7 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 14 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW#define CONFIG_SYS_NAND_ECCSTEPS 4#define CONFIG_SYS_NAND_ECCTOTAL
(CONFIG_SYS_NAND_ECCBYTES *
Review
Quoted 2 lines
\
(quoted diff) +0
-0
b/include/configs/tam3517-common.h
include/configs/tam3517-common.h line 260
Quoted 13 lines
index 6112c1b..439fc47 100644
include/configs/tam3517-common.h +0
-1@@ -224,7 +224,6 @@#define CONFIG_SPL_BOARD_INIT #define CONFIG_SPL_CONSOLE #define CONFIG_SPL_NAND_SIMPLE -#define CONFIG_SPL_NAND_SOFTECC #define CONFIG_SPL_NAND_WORKSPACE 0x8f07f000/* below BSS */ #define CONFIG_SPL_LIBCOMMON_SUPPORT @@ -261,6 +260,7 @@ 56, 57, 58, 59, 60, 61, 62,
63}
Review
Quoted 7 lines
include/configs/tam3517-common.h +1
-0#define CONFIG_SYS_NAND_ECCSIZE 256#define CONFIG_SYS_NAND_ECCBYTES 3 +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_SW#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE(quoted diff) +0
-0
b/include/configs/tricorder.h
include/configs/tricorder.h line 139
Quoted 6 lines
index afd8707..b38b955 100644
include/configs/tricorder.h +0
-0@@ -138,7 +138,6 @@#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number
of
Quoted 2 lines
NAND */
/* devices
*/
include/configs/tricorder.h line 376
Quoted 9 lines
include/configs/tricorder.h +1
-1-#define CONFIG_NAND_OMAP_BCH8 #define CONFIG_BCH /* commands to include */ @@ -374,6 +373,7 @@#define CONFIG_SYS_NAND_ECCSIZE 512#define CONFIG_SYS_NAND_ECCBYTES 13 +#define CONFIG_NAND_OMAP_ECCSCHEME
OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
Quoted 5 lines
include/configs/tricorder.h +0
-1#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE --1.8.1
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1994 bis 2014 - 20 Jahre SensoPart Industriesensorik >>
http://www.sensopart.com/de/aktuelles/sensopart-news
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Besuchen Sie uns 2014 auf folgenden Messen:
21.-24.01.2014 NORTEC, Hamburg
13.-16.03.2014 CWIEME, Xian, China 01.-03.04.2014 Smart Industrie, Paris 07.-09.05.2014 Industrial Automation, Peking 03.-06.06.2014 AUTOMATICA, M?nchen 01.-05.09.2014 CNZBH, Shenyang, China 06.-09.10.2014 MOTEK, Stuttgart
04.-08.11.2014 CIIF Expo, Shanghai 05.-07.11.2014 FMB Forum Maschinenbau, Bad Salzuflen 04.-06.11.2014 VISION, Stuttgart
25.-27.11.2014 sps ipc drives, N?rnberg
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Besuchen Sie uns auf http://www.sensopart.com
Postanschrift: Sensopart GmbH | Am Wiedenbach 1 | D-79695 Wieden, Germany
Gesch?ftsf?hrer: Dr. Theodor Wanner - Sitz der Gesellschaft: 79695 Wieden/Baden-W?rttemberg
Handelsregister: Amtsgericht Freiburg HRB 660163
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Zus?tzliche Hinweise / Additional information
Vertraulichkeit: Diese E-Mail und/oder ihre Anh?nge kann vertrauliche und/oder rechtlich gesch?tzte Informationen enthalten. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
Virus: Diese E-Mail wurde auf Viren ?berpr?ft. Dies garantiert aber keine Virenfreiheit. Wir ?bernehmen keine Haftung f?r eventuelle Sch?den, die durch diese E-Mail oder deren Anh?nge entstehen k?nnten. Danke f?r Ihr Verst?ndnis.
Notice: This transmittal and/or attachments may be privileged or confidential. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error; any review, dissemination, or copying is strictly prohibited. If you received this transmittal in error, please notify us immediately by reply and immediately delete this message and all its attachments. Thank you
Dear Steffen Arendt,
you could test the tricorder configuration. It does work with Pekon's patchset mentioned in your mail.
I haven't tested Pekon's changes when they where included. But my regular tests before each U-Boot release showed a change in OOB layout, therefore commit 1b82491ee6ee1e986e5521b33692a00e1f38fe75 was generated. It seems my first attempt to implement OMAP3 HW supported BCH in u-boot was buggy :( Sorry for that!
Quoted 4 lines · Steffen Arendt
Dear Pekon,
thanks for your mail. This ECC topic is of some complexity. :(
Quoted 12 lines
I am close to solve a huge problem here, switching boards from 1bit-SW-ECC to BCH4.
The only missing part is, that OMAP xloader and uboot calculates the BCH4 ECC values than Sitara XLoader
(although the x-loader binaries are identical).
Main problem is not that this is different to Linux - this is not nice, but not a problem. I solved this by implementing a
second linux compatible BCH4 in uboot (which works on both platforms). Problem is, that BCH4 (as it is implemented in aragos xloader) seems not to work on OMAP3503.
And it is not understood by me, why this is not working, or what can the reason for this.
There is an issue in GPMC for AM37xx up to revision 1.0 (Advisory 1.54 'GPMC Has Incorrect ECC Computation for 4-Bit BCH Mode'). I think this includes the OMAP35xx variants.
Quoted 11 lines
You suggestions address kernel/uboot changes. For this I have already a solution.
I am running into other troubles if I shift to your suggestions, and I can't see an improvement for
the xloader problem.
I know, nowadays the xloader is SPL and is derived from uboot. But I haven't the power to completely change everything again. Frankly speaking, I afraid another nightmare here. Unfortunatly TI doesn't have an newer SDK for OMAP3503/AM3703. Is it true, that in this Arago or TI SDK the only functional ECC scheme are 1 bit SW and 1 bit HW (for xloader)?
U-Boot had also only 1 bit Hamming with two different OOB-schemes before my attempt to support BCH. Since X-Loader is outdated I think nobody cared to port these changes. Sorry, I never worked with X-Loader so I can't tell anything about it. You should really migrate to U-Boot!
Quoted 4 lines
For me it seems (if you check my logs) that in xloader the
omap_calculate_ecc_bch4()uses hardware GPMC registers. Main question: why this doens't work or give different results in OMAP?
I think it is because of the errata mentioned above. You should switch to BCH8 on OMAP3 devices in favor of BCH4.
Quoted 7 lines
The version I take over for uboot and kernel (according to Technical Note from Micron tn2971_software_bch_ecc_on_linux.pdf), this functions. The counterpart for this seems to me in
bch.cencode_bch(), which seems to run completly independent on hardware.Please understand my situation. At TI forum I asked since monthes with no real help. So I started my work and succeeded 90%.
U-Boot BCH8 support for OMAP3 is working, one example is tricorder board.
Best regards
Andreas Bie?mann