aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/cmdlinepart.c
diff options
context:
space:
mode:
authorChristopher Cordahi <christophercordahi@nanometrics.ca>2012-12-18 16:11:51 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-02-04 02:26:28 -0500
commitea8b8e27fecd44c4fb7b3c6f8f72ea7b92f87fe8 (patch)
treec4b407c1127f553b4ac1d0975dc0f94f18d37150 /drivers/mtd/cmdlinepart.c
parentebf4f0707df410a7666ec409ee68dc068db56e97 (diff)
mtd: cmdlinepart: describe mtd ordering
The mtd documentation makes no mention of the useful feature whereby partitions' logical ordering need not match their physical ordering. Truncation of parts, skipping of zero sized parts, and handling of overlapping parts are similarly not mentioned. This updates the comments at the top of file describing the command line parsing as currently implemented. I proposed this in http://lists.infradead.org/pipermail/linux-mtd/2012-December/045314.html Signed-off-by: Christopher Cordahi <christophercordahi@nanometrics.ca> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/cmdlinepart.c')
-rw-r--r--drivers/mtd/cmdlinepart.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 525c5795d4f5..8d4a16661649 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -23,11 +23,22 @@
23 * mtdparts=<mtddef>[;<mtddef] 23 * mtdparts=<mtddef>[;<mtddef]
24 * <mtddef> := <mtd-id>:<partdef>[,<partdef>] 24 * <mtddef> := <mtd-id>:<partdef>[,<partdef>]
25 * where <mtd-id> is the name from the "cat /proc/mtd" command 25 * where <mtd-id> is the name from the "cat /proc/mtd" command
26 * <partdef> := <size>[@offset][<name>][ro][lk] 26 * <partdef> := <size>[@<offset>][<name>][ro][lk]
27 * <mtd-id> := unique name used in mapping driver/device (mtd->name) 27 * <mtd-id> := unique name used in mapping driver/device (mtd->name)
28 * <size> := standard linux memsize OR "-" to denote all remaining space 28 * <size> := standard linux memsize OR "-" to denote all remaining space
29 * size is automatically truncated at end of device
30 * if specified or trucated size is 0 the part is skipped
31 * <offset> := standard linux memsize
32 * if omitted the part will immediately follow the previous part
33 * or 0 if the first part
29 * <name> := '(' NAME ')' 34 * <name> := '(' NAME ')'
30 * 35 *
36 * <size> and <offset> can be specified such that the parts are out of order
37 * in physical memory and may even overlap.
38 *
39 * The parts are assigned MTD numbers in the order they are specified in the
40 * command line regardless of their order in physical memory.
41 *
31 * Examples: 42 * Examples:
32 * 43 *
33 * 1 NOR Flash, with 1 single writable partition: 44 * 1 NOR Flash, with 1 single writable partition: