diff mbox

[1/2] mtd: cmdlinepart: describe mtd ordering

Message ID 653ac5f88c42f6d24be04c354ddbadd8db20b8ba.1355863937.git.christophercordahi@nanometrics.ca
State Accepted
Commit ea8b8e27fecd44c4fb7b3c6f8f72ea7b92f87fe8
Headers show

Commit Message

Christopher Cordahi Dec. 18, 2012, 9:11 p.m. UTC
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>
---
 drivers/mtd/cmdlinepart.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 525c579..8d4a166 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -23,11 +23,22 @@ 
  * mtdparts=<mtddef>[;<mtddef]
  * <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
  *              where <mtd-id> is the name from the "cat /proc/mtd" command
- * <partdef> := <size>[@offset][<name>][ro][lk]
+ * <partdef> := <size>[@<offset>][<name>][ro][lk]
  * <mtd-id>  := unique name used in mapping driver/device (mtd->name)
  * <size>    := standard linux memsize OR "-" to denote all remaining space
+ *              size is automatically truncated at end of device
+ *              if specified or trucated size is 0 the part is skipped
+ * <offset>  := standard linux memsize
+ *              if omitted the part will immediately follow the previous part
+ *              or 0 if the first part
  * <name>    := '(' NAME ')'
  *
+ * <size> and <offset> can be specified such that the parts are out of order
+ * in physical memory and may even overlap.
+ *
+ * The parts are assigned MTD numbers in the order they are specified in the
+ * command line regardless of their order in physical memory.
+ *
  * Examples:
  *
  * 1 NOR Flash, with 1 single writable partition: