All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: <computersforpeace@gmail.com>, <tony@atomide.com>
Cc: <balbi@ti.com>, <ezequiel.garcia@free-electrons.com>,
	<pekon.gupta@gmail.com>, <artem.bityutskiy@linux.intel.com>,
	<dwmw2@infradead.org>, <jg1.han@samsung.com>,
	<linux-mtd@lists.infradead.org>, <linux-omap@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: [PATCH 2/3] ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
Date: Tue, 5 Aug 2014 13:11:21 +0300	[thread overview]
Message-ID: <1407233482-11642-3-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1407233482-11642-1-git-send-email-rogerq@ti.com>

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>
---
 Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
 arch/arm/mach-omap2/gpmc.c                          | 7 +++++--
 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 65f4f7c..ee654e9 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -22,7 +22,7 @@ Optional properties:
 				width of 8 is assumed.
 
  - ti,nand-ecc-opt:		A string setting the ECC layout to use. One of:
-		"sw"		<deprecated> use "ham1" instead
+		"sw"		1-bit Hamming ecc code via software
 		"hw"		<deprecated> use "ham1" instead
 		"hw-romcode"	<deprecated> use "ham1" instead
 		"ham1"		1-bit Hamming ecc code
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 8bc1338..9f42d54 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,
 		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"))
-- 
1.8.3.2


WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: computersforpeace@gmail.com, tony@atomide.com
Cc: balbi@ti.com, ezequiel.garcia@free-electrons.com,
	pekon.gupta@gmail.com, artem.bityutskiy@linux.intel.com,
	dwmw2@infradead.org, jg1.han@samsung.com,
	linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, Roger Quadros <rogerq@ti.com>
Subject: [PATCH 2/3] ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
Date: Tue, 5 Aug 2014 13:11:21 +0300	[thread overview]
Message-ID: <1407233482-11642-3-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1407233482-11642-1-git-send-email-rogerq@ti.com>

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>
---
 Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
 arch/arm/mach-omap2/gpmc.c                          | 7 +++++--
 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 65f4f7c..ee654e9 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -22,7 +22,7 @@ Optional properties:
 				width of 8 is assumed.
 
  - ti,nand-ecc-opt:		A string setting the ECC layout to use. One of:
-		"sw"		<deprecated> use "ham1" instead
+		"sw"		1-bit Hamming ecc code via software
 		"hw"		<deprecated> use "ham1" instead
 		"hw-romcode"	<deprecated> use "ham1" instead
 		"ham1"		1-bit Hamming ecc code
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 8bc1338..9f42d54 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,
 		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"))
-- 
1.8.3.2

WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: <computersforpeace@gmail.com>, <tony@atomide.com>
Cc: artem.bityutskiy@linux.intel.com, jg1.han@samsung.com,
	linux-kernel@vger.kernel.org, balbi@ti.com,
	linux-mtd@lists.infradead.org,
	ezequiel.garcia@free-electrons.com, pekon.gupta@gmail.com,
	linux-omap@vger.kernel.org, dwmw2@infradead.org,
	Roger Quadros <rogerq@ti.com>
Subject: [PATCH 2/3] ARM: OMAP2+: GPMC: Support Software ECC scheme via DT
Date: Tue, 5 Aug 2014 13:11:21 +0300	[thread overview]
Message-ID: <1407233482-11642-3-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1407233482-11642-1-git-send-email-rogerq@ti.com>

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>
---
 Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
 arch/arm/mach-omap2/gpmc.c                          | 7 +++++--
 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 65f4f7c..ee654e9 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -22,7 +22,7 @@ Optional properties:
 				width of 8 is assumed.
 
  - ti,nand-ecc-opt:		A string setting the ECC layout to use. One of:
-		"sw"		<deprecated> use "ham1" instead
+		"sw"		1-bit Hamming ecc code via software
 		"hw"		<deprecated> use "ham1" instead
 		"hw-romcode"	<deprecated> use "ham1" instead
 		"ham1"		1-bit Hamming ecc code
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 8bc1338..9f42d54 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,
 		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"))
-- 
1.8.3.2

  parent reply	other threads:[~2014-08-05 10:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 10:11 [PATCH 0/3] [PATCH 0/3] mtd: nand: omap: Use Software ECC by default Roger Quadros
2014-08-05 10:11 ` Roger Quadros
2014-08-05 10:11 ` Roger Quadros
2014-08-05 10:11 ` [PATCH 1/3] mtd: nand: omap: Revert to using software " Roger Quadros
2014-08-05 10:11   ` Roger Quadros
2014-08-05 10:11   ` Roger Quadros
2014-08-05 16:15   ` Grazvydas Ignotas
2014-08-05 16:15     ` Grazvydas Ignotas
2014-08-05 20:30     ` pekon
2014-08-05 20:30       ` pekon
2014-08-05 20:30       ` pekon
2014-08-06  8:31       ` Roger Quadros
2014-08-06  8:31         ` Roger Quadros
2014-08-06  8:31         ` Roger Quadros
2014-08-06  8:02     ` Roger Quadros
2014-08-06  8:02       ` Roger Quadros
2014-08-06  8:02       ` Roger Quadros
2014-08-06 22:55       ` Grazvydas Ignotas
2014-08-06 22:55         ` Grazvydas Ignotas
2014-08-07  8:43         ` Roger Quadros
2014-08-07  8:43           ` Roger Quadros
2014-08-07  8:43           ` Roger Quadros
2014-08-22 23:11         ` Tony Lindgren
2014-08-22 23:11           ` Tony Lindgren
2014-08-22 23:11           ` Tony Lindgren
2014-08-05 10:11 ` Roger Quadros [this message]
2014-08-05 10:11   ` [PATCH 2/3] ARM: OMAP2+: GPMC: Support Software ECC scheme via DT Roger Quadros
2014-08-05 10:11   ` Roger Quadros
2014-08-05 10:11 ` [PATCH 3/3] ARM: dts: omap3430-sdp: Revert to using software ECC for NAND Roger Quadros
2014-08-05 10:11   ` Roger Quadros
2014-08-05 10:11   ` Roger Quadros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407233482-11642-3-git-send-email-rogerq@ti.com \
    --to=rogerq@ti.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=balbi@ti.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pekon.gupta@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.