]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/omap3/board.c
omap: gpmc: 'nandecc sw' can use HAM1 or BCH8
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / omap3 / board.c
index 347947c4b3545bcfe1a583d0115a3f0faea17812..dd53b207f850e2fbe2c5064df414f4ed77457d5a 100644 (file)
@@ -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;
        }