aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2011-11-19 10:02:51 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:07:22 -0500
commit316e627edcd8186f199120931f5381615a0d9aa4 (patch)
treefe15e2f26f32e820efca0ed24a095da4fcaf18ef
parent376fbf208700f2105d4047b198ca43e1d9db0b33 (diff)
mtd: docg3: add OOB buffer to device structure
Add OOB buffer area to store the OOB data until the actual page is written, so that it can be completed by hardware ECC generator. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com> Reviewed-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/devices/docg3.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/devices/docg3.h b/drivers/mtd/devices/docg3.h
index e9967aba80a8..397e4616796e 100644
--- a/drivers/mtd/devices/docg3.h
+++ b/drivers/mtd/devices/docg3.h
@@ -243,6 +243,11 @@
243 * @device_id: number of the cascaded DoCG3 device (0, 1, 2 or 3) 243 * @device_id: number of the cascaded DoCG3 device (0, 1, 2 or 3)
244 * @if_cfg: if true, reads are on 16bits, else reads are on 8bits 244 * @if_cfg: if true, reads are on 16bits, else reads are on 8bits
245 * @bbt: bad block table cache 245 * @bbt: bad block table cache
246 * @oob_write_ofs: offset of the MTD where this OOB should belong (ie. in next
247 * page_write)
248 * @oob_autoecc: if 1, use only bytes 0-7, 15, and fill the others with HW ECC
249 * if 0, use all the 16 bytes.
250 * @oob_write_buf: prepared OOB for next page_write
246 * @debugfs_root: debugfs root node 251 * @debugfs_root: debugfs root node
247 */ 252 */
248struct docg3 { 253struct docg3 {
@@ -252,6 +257,9 @@ struct docg3 {
252 unsigned int if_cfg:1; 257 unsigned int if_cfg:1;
253 int max_block; 258 int max_block;
254 u8 *bbt; 259 u8 *bbt;
260 loff_t oob_write_ofs;
261 int oob_autoecc;
262 u8 oob_write_buf[DOC_LAYOUT_OOB_SIZE];
255 struct dentry *debugfs_root; 263 struct dentry *debugfs_root;
256}; 264};
257 265