aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2014-08-25 19:15:33 -0400
committerTony Lindgren <tony@atomide.com>2014-08-25 19:15:33 -0400
commita3e83f05fbbf6c4994c658521a750bbd68bdf7a6 (patch)
treed2166d47b481f14434dbb8d9f9ab4c1b464ea616
parent7d5929c1f34304ca5a970cfde8044053e56aa8c9 (diff)
ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
For v3.14 and prior, 1-bit Hamming code ECC via software was the default choice for some boards e.g. 3430sdp. Commit ac65caf514ec in v3.15 changed the behaviour to use 1-bit Hamming code via Hardware using a different ECC layout i.e. (ROM code layout) than what is used by software ECC. This ECC layout change causes NAND filesystems created in v3.14 and prior to be unusable in v3.15 and later. So don't mark "sw" scheme as deperecated and support it. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt2
-rw-r--r--arch/arm/mach-omap2/gpmc.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 65f4f7c43136..ee654e95d8ad 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -22,7 +22,7 @@ Optional properties:
22 width of 8 is assumed. 22 width of 8 is assumed.
23 23
24 - ti,nand-ecc-opt: A string setting the ECC layout to use. One of: 24 - ti,nand-ecc-opt: A string setting the ECC layout to use. One of:
25 "sw" <deprecated> use "ham1" instead 25 "sw" 1-bit Hamming ecc code via software
26 "hw" <deprecated> use "ham1" instead 26 "hw" <deprecated> use "ham1" instead
27 "hw-romcode" <deprecated> use "ham1" instead 27 "hw-romcode" <deprecated> use "ham1" instead
28 "ham1" 1-bit Hamming ecc code 28 "ham1" 1-bit Hamming ecc code
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 8bc13380f0a0..9f42d5437fcc 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1403,8 +1403,11 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
1403 pr_err("%s: ti,nand-ecc-opt not found\n", __func__); 1403 pr_err("%s: ti,nand-ecc-opt not found\n", __func__);
1404 return -ENODEV; 1404 return -ENODEV;
1405 } 1405 }
1406 if (!strcmp(s, "ham1") || !strcmp(s, "sw") || 1406
1407 !strcmp(s, "hw") || !strcmp(s, "hw-romcode")) 1407 if (!strcmp(s, "sw"))
1408 gpmc_nand_data->ecc_opt = OMAP_ECC_HAM1_CODE_SW;
1409 else if (!strcmp(s, "ham1") ||
1410 !strcmp(s, "hw") || !strcmp(s, "hw-romcode"))
1408 gpmc_nand_data->ecc_opt = 1411 gpmc_nand_data->ecc_opt =
1409 OMAP_ECC_HAM1_CODE_HW; 1412 OMAP_ECC_HAM1_CODE_HW;
1410 else if (!strcmp(s, "bch4")) 1413 else if (!strcmp(s, "bch4"))