]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-omap2/gpmc.c
ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
[karo-tx-linux.git] / arch / arm / mach-omap2 / gpmc.c
index 8bc13380f0a06ec14859b8c274883142a14ef968..9f42d5437fcc52e6cb3693f5dbbab18b29c6aebf 100644 (file)
@@ -1403,8 +1403,11 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
                pr_err("%s: ti,nand-ecc-opt not found\n", __func__);
                return -ENODEV;
        }
-       if (!strcmp(s, "ham1") || !strcmp(s, "sw") ||
-               !strcmp(s, "hw") || !strcmp(s, "hw-romcode"))
+
+       if (!strcmp(s, "sw"))
+               gpmc_nand_data->ecc_opt = OMAP_ECC_HAM1_CODE_SW;
+       else if (!strcmp(s, "ham1") ||
+                !strcmp(s, "hw") || !strcmp(s, "hw-romcode"))
                gpmc_nand_data->ecc_opt =
                                OMAP_ECC_HAM1_CODE_HW;
        else if (!strcmp(s, "bch4"))