summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/omap3
diff options
context:
space:
mode:
authorAsh Charles <ashcharles@gmail.com>2015-02-18 19:25:11 (GMT)
committerTom Rini <trini@konsulko.com>2015-03-06 01:49:43 (GMT)
commitb050898efa6b4f0272f12885a7365f044ab4c08e (patch)
tree11f53adecf81f4c3732d61ebb43b7288de517856 /arch/arm/cpu/armv7/omap3
parentd8af39337ea82403fb54a9d345d2e47fac4a8460 (diff)
downloadu-boot-fsl-qoriq-b050898efa6b4f0272f12885a7365f044ab4c08e.tar.xz
omap: gpmc: 'nandecc sw' can use HAM1 or BCH8
The 'nandecc sw' command selects a software-based error correction algorithm. By default, this is OMAP_ECC_HAM1_CODE_SW but some platforms use OMAP_ECC_BCH8_CODE_HW_DETECTION_SW as their software-based correction algorithm. Allow a user to be specific e.g. # nandecc sw <hamming|bch8> where 'hamming' is still the default. Note: we don't just use CONFIG_NAND_OMAP_ECCSCHEME as it might be set to a hardware-based ECC scheme---a little strange when the user has requested 'sw' ECC. Signed-off-by: Ash Charles <ashcharles@gmail.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap3')
-rw-r--r--arch/arm/cpu/armv7/omap3/board.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index 347947c..dd53b20 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -347,7 +347,16 @@ static int do_switch_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char * const arg
goto usage;
}
} else if (strncmp(argv[1], "sw", 2) == 0) {
- omap_nand_switch_ecc(0, 0);
+ if (argc == 2) {
+ omap_nand_switch_ecc(0, 1);
+ } else {
+ if (strncmp(argv[2], "hamming", 7) == 0)
+ omap_nand_switch_ecc(0, 1);
+ else if (strncmp(argv[2], "bch8", 4) == 0)
+ omap_nand_switch_ecc(0, 8);
+ else
+ goto usage;
+ }
} else {
goto usage;
}