aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-06-06 10:04:14 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:02:04 -0400
commit1a31368bf92ef2a7da3ba379672c405bd2751df9 (patch)
tree900ad92a1c8af1bf967ec05623438eb54af9cf80 /include
parentbf5140817b2d65faac9b32fc9057a097044ac35b (diff)
mtd: add a flags for partitions which should just leave smth. after them
Add support for MTDPART_OFS_RETAIN: such partitions start at the current offset, take as much space as possible, but rain part->size bytes after the end of the partitions for other parts. Primarily this is intended for ts72xx arm platforms cleanup. Artem: tweaked the patch a bit Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/partitions.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 08c9c7b8b8e2..1431cf2609ed 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -24,7 +24,9 @@
24 * will extend to the end of the master MTD device. 24 * will extend to the end of the master MTD device.
25 * offset: absolute starting position within the master MTD device; if 25 * offset: absolute starting position within the master MTD device; if
26 * defined as MTDPART_OFS_APPEND, the partition will start where the 26 * defined as MTDPART_OFS_APPEND, the partition will start where the
27 * previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block. 27 * previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block;
28 * if MTDPART_OFS_RETAIN, consume as much as possible, leaving size
29 * after the end of partition.
28 * mask_flags: contains flags that have to be masked (removed) from the 30 * mask_flags: contains flags that have to be masked (removed) from the
29 * master MTD flag set for the corresponding MTD partition. 31 * master MTD flag set for the corresponding MTD partition.
30 * For example, to force a read-only partition, simply adding 32 * For example, to force a read-only partition, simply adding
@@ -42,6 +44,7 @@ struct mtd_partition {
42 struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only) */ 44 struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only) */
43}; 45};
44 46
47#define MTDPART_OFS_RETAIN (-3)
45#define MTDPART_OFS_NXTBLK (-2) 48#define MTDPART_OFS_NXTBLK (-2)
46#define MTDPART_OFS_APPEND (-1) 49#define MTDPART_OFS_APPEND (-1)
47#define MTDPART_SIZ_FULL (0) 50#define MTDPART_SIZ_FULL (0)