mtd: cmdlinepart: update file documentation
cover mtd: cmdlinepart: update file documentation
Update the comments at the top of the file to better reflect the command line parsing and fix /proc/mtd comment.
Christopher Cordahi (2):
mtd: cmdlinepart: describe mtd ordering
mtd: cmdlinepart: update /proc/mtd comment
drivers/mtd/cmdlinepart.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)
PATCH 1/2 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
--- drivers/mtd/cmdlinepart.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
drivers/mtd/cmdlinepart.c +12 -1
@@ -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:
Signature · 1 line
1.7.1
PATCH 2/2 mtd: cmdlinepart: update /proc/mtd comment
In reply to Christopher Cordahi/proc/mtd doesn't contain the mtd-id of the device, but the part name from the command line. This corrects what I believe is an obsolete comment from commit a0ee24a03b1c06813c814b9f70946c8984752f01.
--- drivers/mtd/cmdlinepart.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/cmdlinepart.c +1 -1
@@ -22,7 +22,6 @@* * 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] * <mtd-id> := unique name used in mapping driver/device (mtd->name) * <size> := standard linux memsize OR "-" to denote all remaining space
@@ -32,6 +31,7 @@* if omitted the part will immediately follow the previous part * or 0 if the first part * <name> := '(' NAME ')' +* NAME will appear in /proc/mtd * * <size> and <offset> can be specified such that the parts are out of order * in physical memory and may even overlap.
Signature · 1 line
1.7.1
Quoted 2 lines · Christopher Cordahi
Update the comments at the top of the file to better reflect the command line parsing and fix
/proc/mtdcomment.
Pushed both to l2-mtd.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy