Arm nomadik : Vendor tool compatibility
Subsystems (5)
PATCH 1/1 Arm nomadik : Vendor tool compatibility
The patch adds a compatibility with the vendor toolset which use a different convention for the ECC bytes in the flash memory.
--- arch/arm/mach-nomadik/Kconfig | 11 +++++++++++ drivers/mtd/nand/nomadik_nand.c | 12 ++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-)
= renamed from arch/arm/mach-nomadik/Kconfig +0 -0
b/arch/arm/mach-nomadik/Kconfig
index 2a02b49..af9bcca 100644
arch/arm/mach-nomadik/Kconfig +0 -0
@@ -18,4 +18,15 @@ config I2C_BITBANG_8815NHK select I2C_ALGOBIT default y
=20
+config VENDOR_TOOL_COMPATIBILITY
+ bool "Compatibility for vendor tool"
+ default n
+ help
+ Some flash programmers can use a different placement of + ECC bytes of the convention. Using two different placements + causes errors and makes the memory unreadable. + The use of the vendor toolset to program the memory, can + leads to this problem. + say N if not sure
+
endif
= renamed from drivers/mtd/nand/nomadik_nand.c +0 -0
b/drivers/mtd/nand/nomadik_nand.c
index 7c302d5..9ebe681 100644
drivers/mtd/nand/nomadik_nand.c +0 -0
@@ -44,6 +44,17 @@ struct nomadik_nand_host {struct nand_bbt_descr *bbt_desc; };
=20
+#ifdef CONFIG_VENDOR_TOOL_COMPATIBILITY
+static struct nand_ecclayout nomadik_ecc_layout =3D {
+ .eccbytes =3D 3 * 4,
+ .eccpos =3D {
+ 0x28, 0x29, 0x2A,
+ 0x2B, 0x2C, 0x2D,
+ 0x2E, 0x2F, 0x30,
+ 0x31, 0x32, 0x33},
+ .oobfree =3D {{0x02, 0x26}, {0x34, 0x0C} },
+};
+#else
static struct nand_ecclayout nomadik_ecc_layout =3D {
.eccbytes =3D 3 * 4,
.eccpos =3D { /* each subpage has 16 bytes: pos 2,3,4 hosts ECC */
@@ -54,6 +65,7 @@ static struct nand_ecclayout nomadik_ecc_layout =3D {
/* let's keep bytes 5,6,7 for us, just in case we change ECC algo */ .oobfree =3D { {0x08, 0x08}, {0x18, 0x08}, {0x28, 0x08}, {0x38, 0x08} =
},
};
+#endif
=20
static void nomadik_ecc_control(struct mtd_info *mtd, int mode)
{
--=20
1.6.0.4
------_=_NextPart_001_01CAD0E3.E8424BB7
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.5.7654.12">
<TITLE>[PATCH] Arm nomadik : Vendor tool compatibility</TITLE> </HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=3D2>From a2e31cef5783b8123c10df7a32d4f3a1c08a3803 Mon Sep = 17 00:00:00 2001<BR>
From: Jean-Marie Lemetayer <jeanmarie.lemetayer at altran.com><BR>
Date: Wed, 31 Mar 2010 15:19:50 +0200<BR>
Subject: [PATCH] Arm nomadik : Vendor tool compatibility<BR> <BR>
The patch adds a compatibility with the vendor toolset which use<BR> a different convention for the ECC bytes in the flash memory.<BR> <BR>
Acked-by: Alessandro Rubini <rubini at gnudd.com><BR>
Signed-off-by: Jean-Marie Lemetayer =
<jeanmarie.lemetayer at altran.com><BR>
---<BR>
arch/arm/mach-nomadik/Kconfig | 11 = +++++++++++<BR>
drivers/mtd/nand/nomadik_nand.c | 12 ++++++++++++<BR> 2 files changed, 23 insertions(+), 0 deletions(-)<BR> <BR>
= renamed from arch/arm/mach-nomadik/Kconfig +0 -0
b/arch/arm/mach-nomadik/Kconfig<BR>
index 2a02b49..af9bcca 100644<BR>
arch/arm/mach-nomadik/Kconfig<BR> +0 -0
@@ -18,4 +18,15 @@ config I2C_BITBANG_8815NHK<BR>
select I2C_ALGOBIT<BR> default y<BR>
<BR>
+config VENDOR_TOOL_COMPATIBILITY<BR> + bool "Compatibility for = vendor tool"<BR>
+ default n<BR> + help<BR> + Some flash programmers can = use a different placement of<BR> + ECC bytes of the = convention. Using two different placements<BR> + causes errors and makes the = memory unreadable.<BR>
+ The use of the vendor = toolset to program the memory, can<BR> + leads to this problem.<BR> + say N if not sure<BR> +<BR>
endif<BR>
= renamed from drivers/mtd/nand/nomadik_nand.c +0 -0
b/drivers/mtd/nand/nomadik_nand.c<BR>
index 7c302d5..9ebe681 100644<BR>
drivers/mtd/nand/nomadik_nand.c<BR> +0 -0
@@ -44,6 +44,17 @@ struct nomadik_nand_host {<BR>
struct nand_bbt_descr = *bbt_desc;<BR>
};<BR>
<BR>
+#ifdef CONFIG_VENDOR_TOOL_COMPATIBILITY<BR>
+static struct nand_ecclayout nomadik_ecc_layout =3D {<BR> + .eccbytes =3D 3 * 4,<BR> + .eccpos =3D {<BR> + = 0x28, 0x29, 0x2A,<BR> + = 0x2B, 0x2C, 0x2D,<BR> + = 0x2E, 0x2F, 0x30,<BR> + = 0x31, 0x32, 0x33},<BR> + .oobfree =3D {{0x02, 0x26}, {0x34, = 0x0C} },<BR>
+};<BR>
+#else<BR>
static struct nand_ecclayout nomadik_ecc_layout =3D {<BR> .eccbytes =3D 3 * 4,<BR> .eccpos =3D { /* each subpage = has 16 bytes: pos 2,3,4 hosts ECC */<BR>
@@ -54,6 +65,7 @@ static struct nand_ecclayout nomadik_ecc_layout =3D = {<BR>
/* let's keep bytes 5,6,7 for = us, just in case we change ECC algo */<BR> .oobfree =3D { {0x08, 0x08}, = {0x18, 0x08}, {0x28, 0x08}, {0x38, 0x08} },<BR>
};<BR>
+#endif<BR>
<BR>
static void nomadik_ecc_control(struct mtd_info *mtd, int = mode)<BR>
{<BR>
--<BR>
1.6.0.4<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01CAD0E3.E8424BB7--