aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/docg4.c
diff options
context:
space:
mode:
authorMike Dunn <mikedunn@newsguy.com>2012-12-07 15:07:22 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-12-12 10:03:32 -0500
commit440b1d73b1b49bc08e1709ee6f6ef7ba2fc1f8ba (patch)
treedc1300b245450f1ede61119df6ae107396f32951 /drivers/mtd/nand/docg4.c
parent5a90d41b693bda1318807a49d38ef1444f61dfdd (diff)
mtd: nand/docg4: reserve bb marker area in ecclayout
Modify the nand_ecclayout to place the two bb marker bytes in the oob region off-limits to the user. Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/nand/docg4.c')
-rw-r--r--drivers/mtd/nand/docg4.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index 54b1e5e359b8..04e5fa93735e 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -214,15 +214,17 @@ struct docg4_priv {
214#define DOCG4_FACTORY_BBT_PAGE 16 /* page where read-only factory bbt lives */ 214#define DOCG4_FACTORY_BBT_PAGE 16 /* page where read-only factory bbt lives */
215 215
216/* 216/*
217 * Oob bytes 0 - 6 are available to the user. 217 * Bytes 0, 1 are used as badblock marker.
218 * Byte 7 is hamming ecc for first 7 bytes. Bytes 8 - 14 are hw-generated ecc. 218 * Bytes 2 - 6 are available to the user.
219 * Byte 7 is hamming ecc for first 7 oob bytes only.
220 * Bytes 8 - 14 are hw-generated ecc covering entire page + oob bytes 0 - 14.
219 * Byte 15 (the last) is used by the driver as a "page written" flag. 221 * Byte 15 (the last) is used by the driver as a "page written" flag.
220 */ 222 */
221static struct nand_ecclayout docg4_oobinfo = { 223static struct nand_ecclayout docg4_oobinfo = {
222 .eccbytes = 9, 224 .eccbytes = 9,
223 .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, 225 .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15},
224 .oobavail = 7, 226 .oobavail = 5,
225 .oobfree = { {0, 7} } 227 .oobfree = { {.offset = 2, .length = 5} }
226}; 228};
227 229
228/* 230/*