mtd: docg3 refactor cascade floors structure
[deliverable/linux.git] / drivers / mtd / devices / docg3.h
index db0da436b49332dbea30971e44392a5fa9887461..642e60667cfd183d1fa2d0835b95618ca371e2ef 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef _MTD_DOCG3_H
 #define _MTD_DOCG3_H
 
+#include <linux/mtd/mtd.h>
+
 /*
  * Flash memory areas :
  *   - 0x0000 .. 0x07ff : IPL
  */
 #define DOC_LAYOUT_DPS_KEY_LENGTH      8
 
+/**
+ * struct docg3_cascade - Cascade of 1 to 4 docg3 chips
+ * @floors: floors (ie. one physical docg3 chip is one floor)
+ * @base: IO space to access all chips in the cascade
+ * @bch: the BCH correcting control structure
+ */
+struct docg3_cascade {
+       struct mtd_info *floors[DOC_MAX_NBFLOORS];
+       void __iomem *base;
+       struct bch_control *bch;
+};
+
 /**
  * struct docg3 - DiskOnChip driver private data
  * @dev: the device currently under control
- * @base: mapped IO space
+ * @cascade: the cascade this device belongs to
  * @device_id: number of the cascaded DoCG3 device (0, 1, 2 or 3)
  * @if_cfg: if true, reads are on 16bits, else reads are on 8bits
 
  */
 struct docg3 {
        struct device *dev;
-       void __iomem *base;
+       struct docg3_cascade *cascade;
        unsigned int device_id:4;
        unsigned int if_cfg:1;
        unsigned int reliable:2;
This page took 0.02913 seconds and 5 git commands to generate.