Lines Matching +full:device +full:- +full:id

9  * Kai-Uwe Bloem, Auerswald GmbH & Co KG, <linux-development@auerswald.de>
21 * $Id: cmdlinepart.c,v 1.17 2004/11/26 11:18:47 lavinen Exp $
22 * Copyright 2002 SYSGO Real-Time Solutions GmbH
24 * SPDX-License-Identifier: GPL-2.0+
30 * 'partition' - keeps current partition identifier
32 * partition := <part-id>
33 * <part-id> := <dev-id>,part_num
36 * 'mtdids' - linux kernel mtd device id <-> u-boot device id mapping
40 * <idmap> := <dev-id>=<mtd-id>
41 * <dev-id> := 'nand'|'nor'|'onenand'|'spi-nand'<dev-num>
42 * <dev-num> := mtd device number, 0...
43 * <mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)
46 * 'mtdparts' - partition list
48 * mtdparts=mtdparts=<mtd-def>[;<mtd-def>...]
50 * <mtd-def> := <mtd-id>:<part-def>[,<part-def>...]
51 * <mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)
52 * <part-def> := <size>[@<offset>][<name>][<ro-flag>]
53 * <size> := standard linux memsize OR '-' to denote all remaining space
54 * <offset> := partition start offset within the device
56 * <ro-flag> := when set to 'ro' makes partition read-only (not used, passed to kernel)
59 * - each <mtd-id> used in mtdparts must albo exist in 'mtddis' mapping
60 * - if the above variables are not set defaults for a given target are used
65 * mtdids=nor0=edb7312-nor
66 * mtdparts=mtdparts=edb7312-nor:-
69 * mtdids=nor0=edb7312-nor,nand0=edb7312-nand
70 * mtdparts=mtdparts=edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
108 * field for read-only partitions */
146 /* device/partition list, parse_cmdline() parses into here */
149 /* current active device and partition number */
237 debug("--- index partitions ---\n"); in index_partitions()
249 mtddevnum += dev->num_parts; in index_partitions()
254 env_set("mtddevname", part->name); in index_partitions()
256 debug("=> mtddevname %s\n", part->name); in index_partitions()
271 * Save current device and partition in environment variable 'partition'.
277 debug("--- current_save ---\n"); in current_save()
280 sprintf(buf, "%s%d,%d", MTD_DEV_TYPE(current_mtd_dev->id->type), in current_save()
281 current_mtd_dev->id->num, current_mtd_partnum); in current_save()
303 * @return 0 if device is valid, 1 otherwise
312 printf("Device %s not found!\n", mtd_dev); in get_mtd_info()
322 * Table of existing MTD flash devices is searched and partition device
325 * @param id of the parent device
329 static int part_validate_eraseblock(struct mtdids *id, struct part_info *part) in part_validate_eraseblock() argument
336 if (get_mtd_info(id->type, id->num, &mtd)) in part_validate_eraseblock()
339 part->sector_size = mtd->erasesize; in part_validate_eraseblock()
341 if (!mtd->numeraseregions) { in part_validate_eraseblock()
343 * Only one eraseregion (NAND, SPI-NAND, OneNAND or uniform NOR), in part_validate_eraseblock()
346 offset = part->offset; in part_validate_eraseblock()
347 if (do_div(offset, mtd->erasesize)) { in part_validate_eraseblock()
350 MTD_DEV_TYPE(id->type), id->num, part->name); in part_validate_eraseblock()
354 size = part->size; in part_validate_eraseblock()
355 if (do_div(size, mtd->erasesize)) { in part_validate_eraseblock()
357 MTD_DEV_TYPE(id->type), id->num, part->name); in part_validate_eraseblock()
362 * Multiple eraseregions (non-uniform NOR), in part_validate_eraseblock()
367 for (i = 0; i < mtd->numeraseregions; i++) { in part_validate_eraseblock()
368 start = mtd->eraseregions[i].offset; in part_validate_eraseblock()
369 for (j = 0; j < mtd->eraseregions[i].numblocks; j++) { in part_validate_eraseblock()
370 if (part->offset == start) in part_validate_eraseblock()
372 start += mtd->eraseregions[i].erasesize; in part_validate_eraseblock()
377 MTD_DEV_TYPE(id->type), id->num, part->name); in part_validate_eraseblock()
383 for (i = 0; i < mtd->numeraseregions; i++) { in part_validate_eraseblock()
384 start = mtd->eraseregions[i].offset; in part_validate_eraseblock()
385 for (j = 0; j < mtd->eraseregions[i].numblocks; j++) { in part_validate_eraseblock()
386 if ((part->offset + part->size) == start) in part_validate_eraseblock()
388 start += mtd->eraseregions[i].erasesize; in part_validate_eraseblock()
392 if ((part->offset + part->size) == start) in part_validate_eraseblock()
396 MTD_DEV_TYPE(id->type), id->num, part->name); in part_validate_eraseblock()
412 * @param id of the parent device
416 static int part_validate(struct mtdids *id, struct part_info *part) in part_validate() argument
418 if (part->size == SIZE_REMAINING) in part_validate()
419 part->size = id->size - part->offset; in part_validate()
421 if (part->offset > id->size) { in part_validate()
423 id->mtd_id, part->offset, id->size); in part_validate()
427 if ((part->offset + part->size) <= part->offset) { in part_validate()
429 MTD_DEV_TYPE(id->type), id->num, part->name); in part_validate()
433 if (part->offset + part->size > id->size) { in part_validate()
434 printf("%s: partitioning exceeds flash size\n", id->mtd_id); in part_validate()
442 return part_validate_eraseblock(id, part); in part_validate()
446 * Delete selected partition from the partition list of the specified device.
448 * @param dev device to delete partition from
456 /* if there is only one partition, remove whole device */ in part_del()
457 if (dev->num_parts == 1) in part_del()
463 /* we are modyfing partitions for the current device, in part_del()
472 } else if (part->offset <= curr_pi->offset) { in part_del()
473 current_mtd_partnum--; in part_del()
479 list_del(&part->link); in part_del()
481 dev->num_parts--; in part_del()
523 part->dev = dev; in part_sort_add()
525 if (list_empty(&dev->parts)) { in part_sort_add()
527 list_add(&part->link, &dev->parts); in part_sort_add()
528 dev->num_parts++; in part_sort_add()
533 new_pi = list_entry(&part->link, struct part_info, link); in part_sort_add()
535 /* get current partition info if we are updating current device */ in part_sort_add()
540 list_for_each(entry, &dev->parts) { in part_sort_add()
546 if ((new_pi->offset == pi->offset) && (pi->offset == 0)) { in part_sort_add()
551 if (new_pi->offset <= pi->offset) { in part_sort_add()
552 list_add_tail(&part->link, entry); in part_sort_add()
553 dev->num_parts++; in part_sort_add()
555 if (curr_pi && (pi->offset <= curr_pi->offset)) { in part_sort_add()
557 * device, update current */ in part_sort_add()
567 list_add_tail(&part->link, &dev->parts); in part_sort_add()
568 dev->num_parts++; in part_sort_add()
574 * Add provided partition to the partition list of a given device.
576 * @param dev device to which partition is added
583 if (part_validate(dev->id, part) != 0) in part_add()
597 * @param partdef pointer to the partition definition string i.e. <part-def>
617 if (*p == '-') { in part_parse()
619 debug("'-': remaining size assigned\n"); in part_parse()
644 name_len = p - name + 1; in part_parse()
645 if ((name_len - 1) == 0) { in part_parse()
667 printf("no partitions allowed after a fill-up partition\n"); in part_parse()
686 part->size = size; in part_parse()
687 part->offset = offset; in part_parse()
688 part->mask_flags = mask_flags; in part_parse()
689 part->name = (char *)(part + 1); in part_parse()
693 strncpy(part->name, name, name_len - 1); in part_parse()
694 part->auto_name = 0; in part_parse()
697 snprintf(part->name, name_len, "0x%08llx@0x%08llx", size, offset); in part_parse()
698 part->auto_name = 1; in part_parse()
701 part->name[name_len - 1] = '\0'; in part_parse()
702 INIT_LIST_HEAD(&part->link); in part_parse()
704 debug("+ partition: name %-22s size 0x%08llx offset 0x%08llx mask flags %d\n", in part_parse()
705 part->name, part->size, in part_parse()
706 part->offset, part->mask_flags); in part_parse()
713 * Check device number to be within valid range for given device type.
717 * @param size a pointer to the size of the mtd device (output)
718 * @return 0 if device is valid, 1 otherwise
727 *size = mtd->size; in mtd_device_validate()
734 * each device and delete all device partitions.
747 part_delall(&dev_tmp->parts); in device_delall()
756 * If provided device exists it's partitions are deleted, device is removed
757 * from device list and device memory is freed.
759 * @param dev device to be deleted
764 part_delall(&dev->parts); in device_del()
765 list_del(&dev->link); in device_del()
769 /* we just deleted current device */ in device_del()
787 * Search global device list and return pointer to the device of type and num
790 * @param type device type
791 * @param num device number
792 * @return NULL if requested device does not exist
802 if ((dev_tmp->id->type == type) && (dev_tmp->id->num == num)) in device_find()
810 * Add specified device to the global device list.
812 * @param dev device to be added
824 list_add_tail(&dev->link, &devices); in device_add()
833 * Parse device type, name and mtd-id. If syntax is ok allocate memory and
834 * return pointer to the device structure.
836 * @param mtd_dev pointer to the device definition string i.e. <mtd-dev>
838 * @param retdev pointer to the allocated device (output)
845 struct mtdids *id; in device_parse() local
864 /* fetch <mtd-id> */ in device_parse()
867 printf("no <mtd-id> identifier\n"); in device_parse()
870 mtd_id_len = p - mtd_id + 1; in device_parse()
873 /* verify if we have a valid device specified */ in device_parse()
874 if ((id = id_find_by_mtd_id(mtd_id, mtd_id_len - 1)) == NULL) { in device_parse()
875 printf("invalid mtd device '%.*s'\n", mtd_id_len - 1, mtd_id); in device_parse()
880 debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n", in device_parse()
881 id->type, MTD_DEV_TYPE(id->type), in device_parse()
882 id->num, id->mtd_id); in device_parse()
883 debug("parsing partitions %.*s\n", (int)(pend ? pend - p : strlen(p)), p); in device_parse()
889 if ((dev = device_find(id->type, id->num)) != NULL) { in device_parse()
890 /* if device already exists start at the end of the last partition */ in device_parse()
891 part = list_entry(dev->parts.prev, struct part_info, link); in device_parse()
892 offset = part->offset + part->size; in device_parse()
901 if (part->offset == OFFSET_NOT_SPECIFIED) in device_parse()
902 part->offset = offset; in device_parse()
904 offset = part->offset; in device_parse()
907 if (part_validate(id, part) != 0) in device_parse()
910 offset += part->size; in device_parse()
913 list_add_tail(&part->link, &tmp_list); in device_parse()
924 /* check for next device presence */ in device_parse()
933 printf("unexpected character '%c' at the end of device\n", *p); in device_parse()
946 dev->id = id; in device_parse()
947 dev->num_parts = 0; /* part_sort_add increments num_parts */ in device_parse()
948 INIT_LIST_HEAD(&dev->parts); in device_parse()
949 INIT_LIST_HEAD(&dev->link); in device_parse()
951 /* move partitions from tmp_list to dev->parts */ in device_parse()
968 * Initialize global device list.
982 * Search global mtdids list and find id of requested type and number.
984 * @return pointer to the id if it exists, NULL otherwise
989 struct mtdids *id; in id_find() local
992 id = list_entry(entry, struct mtdids, link); in id_find()
994 if ((id->type == type) && (id->num == num)) in id_find()
995 return id; in id_find()
1002 * Search global mtdids list and find id of a requested mtd_id.
1008 * @return pointer to the id if it exists, NULL otherwise
1013 struct mtdids *id; in id_find_by_mtd_id() local
1015 debug("--- id_find_by_mtd_id: '%.*s' (len = %d)\n", in id_find_by_mtd_id()
1019 id = list_entry(entry, struct mtdids, link); in id_find_by_mtd_id()
1022 id->mtd_id, strlen(id->mtd_id)); in id_find_by_mtd_id()
1024 if (mtd_id_len != strlen(id->mtd_id)) in id_find_by_mtd_id()
1026 if (strncmp(id->mtd_id, mtd_id, mtd_id_len) == 0) in id_find_by_mtd_id()
1027 return id; in id_find_by_mtd_id()
1034 * Parse device id string <dev-id> := 'nand'|'nor'|'onenand'|'spi-nand'<dev-num>,
1035 * return device type and number.
1037 * @param id string describing device id
1039 * @param dev_type parsed device type (output)
1040 * @param dev_num parsed device number (output)
1043 int mtd_id_parse(const char *id, const char **ret_id, u8 *dev_type, in mtd_id_parse() argument
1046 const char *p = id; in mtd_id_parse()
1058 } else if (strncmp(p, "spi-nand", 8) == 0) { in mtd_id_parse()
1062 printf("incorrect device type in %s\n", id); in mtd_id_parse()
1067 printf("incorrect device number in %s\n", id); in mtd_id_parse()
1094 u32 maxlen = buflen - 1; in generate_mtdparts()
1096 debug("--- generate_mtdparts ---\n"); in generate_mtdparts()
1110 len = strlen(dev->id->mtd_id) + 1; in generate_mtdparts()
1113 memcpy(p, dev->id->mtd_id, len - 1); in generate_mtdparts()
1114 p += len - 1; in generate_mtdparts()
1116 maxlen -= len; in generate_mtdparts()
1121 list_for_each(pentry, &dev->parts) { in generate_mtdparts()
1123 size = part->size; in generate_mtdparts()
1124 offset = part->offset; in generate_mtdparts()
1134 maxlen -= len; in generate_mtdparts()
1140 (prev_part && ((prev_part->offset + prev_part->size) != part->offset))) { in generate_mtdparts()
1147 memcpy(p, tmpbuf, len - 1); in generate_mtdparts()
1148 p += len - 1; in generate_mtdparts()
1149 maxlen -= len; in generate_mtdparts()
1153 if(!part->auto_name) { in generate_mtdparts()
1154 len = strlen(part->name) + 2; in generate_mtdparts()
1159 memcpy(p, part->name, len - 2); in generate_mtdparts()
1160 p += len - 2; in generate_mtdparts()
1162 maxlen -= len; in generate_mtdparts()
1166 if (part->mask_flags && MTD_WRITEABLE_CMD) { in generate_mtdparts()
1172 maxlen -= 2; in generate_mtdparts()
1177 if (dev->num_parts > part_cnt) { in generate_mtdparts()
1181 maxlen--; in generate_mtdparts()
1186 if (dentry->next != &devices) { in generate_mtdparts()
1190 maxlen--; in generate_mtdparts()
1239 if (!mtd->block_isbad) in net_part_size()
1240 return part->size; in net_part_size()
1242 for (i = 0; i < part->size; i += mtd->erasesize) { in net_part_size()
1243 if (!mtd->block_isbad(mtd, part->offset + i)) in net_part_size()
1244 net_size += mtd->erasesize; in net_part_size()
1260 /* list partitions for given device */
1265 if (get_mtd_info(dev->id->type, dev->id->num, &mtd))
1269 MTD_DEV_TYPE(dev->id->type), dev->id->num,
1270 dev->id->mtd_id, dev->num_parts);
1273 list_for_each(pentry, &dev->parts) {
1279 size_note = part->size == net_size ? " " : " (!)";
1280 printf("%2d: %-20s0x%08x\t0x%08x%s\t0x%08x\t%d\n",
1281 part_num, part->name, part->size,
1282 net_size, size_note, part->offset,
1283 part->mask_flags);
1286 MTD_DEV_TYPE(dev->id->type), dev->id->num,
1287 dev->id->mtd_id, dev->num_parts);
1290 list_for_each(pentry, &dev->parts) {
1292 printf("%2d: %-20s0x%08llx\t0x%08llx\t%d\n",
1293 part_num, part->name, part->size,
1294 part->offset, part->mask_flags);
1305 * Format and print out a partition list for each device from global device
1312 debug("\n---list_partitions---\n");
1315 /* current_mtd_dev is not NULL only when we have non empty device list */
1319 printf("\nactive partition: %s%d,%d - (%s) 0x%08llx @ 0x%08llx\n",
1320 MTD_DEV_TYPE(current_mtd_dev->id->type),
1321 current_mtd_dev->id->num, current_mtd_partnum,
1322 part->name, part->size, part->offset);
1343 * corresponding device and verify partition number.
1345 * @param id string describing device and partition or partition name
1346 * @param dev pointer to the requested device (output)
1351 int find_dev_and_part(const char *id, struct mtd_device **dev, argument
1358 debug("--- find_dev_and_part ---\nid = %s\n", id);
1363 list_for_each(pentry, &(*dev)->parts) {
1365 if (strcmp((*part)->name, id) == 0)
1371 p = id;
1390 printf("no such device %s%d\n", MTD_DEV_TYPE(type), dnum);
1406 * Find and delete partition. For partition id format see find_dev_and_part().
1408 * @param id string describing device and partition
1411 static int delete_partition(const char *id) argument
1417 if (find_dev_and_part(id, &dev, &pnum, &part) == 0) {
1419 debug("delete_partition: device = %s%d, partition %d = (%s) 0x%08llx@0x%08llx\n",
1420 MTD_DEV_TYPE(dev->id->type), dev->id->num, pnum,
1421 part->name, part->size, part->offset);
1433 printf("partition %s not found\n", id);
1443 * @param mtd the mtd device
1454 mtd_get_len_incl_bad(mtd, part->offset, part->size, &net_size,
1463 mtd_get_len_incl_bad(mtd, part->offset + net_size,
1464 mtd->erasesize, &padding_size, &truncated);
1468 padding_size -= mtd->erasesize;
1472 printf("truncated partition %s to %lld bytes\n", part->name,
1476 part->size = net_size + padding_size;
1477 *next_offset = part->offset + part->size;
1499 if (get_mtd_info(dev->id->type, dev->id->num, &mtd))
1504 list_for_each(pentry, &dev->parts) {
1507 debug("spread_partitions: device = %s%d, partition %d ="
1509 MTD_DEV_TYPE(dev->id->type), dev->id->num,
1510 part_num, part->name, part->size,
1511 part->offset);
1513 if (cur_offs > part->offset)
1514 part->offset = cur_offs;
1535 * buffer. gd->env_buf will be too small.
1542 if (gd->flags & GD_FLG_ENV_READY)
1544 if (env_get_f("mtdparts", buf, MTDPARTS_MAXLEN) != -1)
1563 debug("\n---parse_mtdparts---\nmtdparts = %s\n\n", mtdparts);
1567 printf("could not initialise device list\n");
1571 /* re-read 'mtdparts' variable, mtd_devices_init may be updating env */
1587 debug("+ device: %s\t%d\t%s\n", MTD_DEV_TYPE(dev->id->type),
1588 dev->id->num, dev->id->mtd_id);
1590 /* check if parsed device is already on the list */
1591 if (device_find(dev->id->type, dev->id->num) != NULL) {
1592 printf("device %s%d redefined, please correct mtdparts variable\n",
1593 MTD_DEV_TYPE(dev->id->type), dev->id->num);
1597 list_add_tail(&dev->link, &devices);
1621 struct mtdids *id; local
1628 debug("\n---parse_mtdids---\nmtdids = %s\n\n", ids);
1633 debug("mtdids del: %d %d\n", id_tmp->type, id_tmp->num);
1643 /* parse 'nor'|'nand'|'onenand'|'spi-nand'<dev-num> */
1648 printf("mtdids: incorrect <dev-num>\n");
1653 /* check if requested device exists */
1657 /* locate <mtd-id> */
1660 mtd_id_len = p - mtd_id + 1;
1666 printf("mtdids: no <mtd-id> identifier\n");
1670 /* check if this id is already on the list */
1674 if ((id_tmp->type == type) && (id_tmp->num == num)) {
1680 printf("device id %s%d redefined, please correct mtdids variable\n",
1686 if (!(id = (struct mtdids *)malloc(sizeof(struct mtdids) + mtd_id_len))) {
1690 memset(id, 0, sizeof(struct mtdids) + mtd_id_len);
1691 id->num = num;
1692 id->type = type;
1693 id->size = size;
1694 id->mtd_id = (char *)(id + 1);
1695 strncpy(id->mtd_id, mtd_id, mtd_id_len - 1);
1696 id->mtd_id[mtd_id_len - 1] = '\0';
1697 INIT_LIST_HEAD(&id->link);
1699 debug("+ id %s%d\t%16lld bytes\t%s\n",
1700 MTD_DEV_TYPE(id->type), id->num,
1701 id->size, id->mtd_id);
1703 list_add_tail(&id->link, &mtdids);
1722 * device/partition list.
1735 debug("\n---mtdparts_init---\n");
1780 if (strlen(ids) > MTDIDS_MAXLEN - 1) {
1796 if (parts && (strlen(parts) > MTDPARTS_MAXLEN - 1)) {
1835 MTD_DEV_TYPE(current_mtd_dev->id->type),
1836 current_mtd_dev->id->num, current_mtd_partnum);
1853 debug("--- getting current partition: %s\n", tmp_ep);
1870 * device.
1872 * @param dev device that is to be searched for a partition
1885 debug("\n--- mtd_part_info: partition number %d for device %s%d (%s)\n",
1886 part_num, MTD_DEV_TYPE(dev->id->type),
1887 dev->id->num, dev->id->mtd_id);
1889 if (part_num >= dev->num_parts) {
1890 printf("invalid partition number %d for device %s%d (%s)\n",
1891 part_num, MTD_DEV_TYPE(dev->id->type),
1892 dev->id->num, dev->id->mtd_id);
1898 list_for_each(entry, &dev->parts) {
1910 /* U-Boot commands */
1914 * Routine implementing u-boot chpart command. Sets new current partition based
1915 * on the user supplied partition id. For partition id format see find_dev_and_part().
1934 printf("no partition id specified\n");
1946 MTD_DEV_TYPE(dev->id->type), dev->id->num, pnum);
1952 * Routine implementing u-boot mtdparts command. Initialize/update default global
1993 /* mtdparts add <mtd-dev> <size>[@<offset>] <name> [ro] */
2004 struct mtdids *id; local
2010 if ((id = id_find(type, num)) == NULL) {
2011 printf("no such device %s defined in mtdids variable\n", argv[2]);
2015 len = strlen(id->mtd_id) + 1; /* 'mtd_id:' */
2026 id->mtd_id, argv[3], argv[4], argv[5] ? argv[5] : "");
2032 debug("+ %s\t%d\t%s\n", MTD_DEV_TYPE(dev->id->type),
2033 dev->id->num, dev->id->mtd_id);
2035 p = list_entry(dev->parts.next, struct part_info, link);
2038 if (get_mtd_info(dev->id->type, dev->id->num, &mtd))
2043 debug("increased %s to %llu bytes\n", p->name, p->size);
2047 dev_tmp = device_find(dev->id->type, dev->id->num);
2064 /* mtdparts del part-id */
2066 debug("del: part-id = %s\n", argv[2]);
2083 "part-id\n"
2084 " - change active partition (e.g. part-id = nand0,1)"
2090 " - list partition table\n"
2092 " - delete all partitions\n"
2093 "mtdparts del part-id\n"
2094 " - delete partition (e.g. part-id = nand0,1)\n"
2095 "mtdparts add <mtd-dev> <size>[@<offset>] [<name>] [ro]\n"
2096 " - add partition\n"
2098 "mtdparts add.spread <mtd-dev> <size>[@<offset>] [<name>] [ro]\n"
2099 " - add partition, padding size by skipping bad blocks\n"
2102 " - reset partition table to defaults\n"
2105 " - adjust the sizes of the partitions so they are\n"
2111 "-----\n\n"
2113 "'partition' - keeps current partition identifier\n\n"
2114 "partition := <part-id>\n"
2115 "<part-id> := <dev-id>,part_num\n\n"
2116 "'mtdids' - linux kernel mtd device id <-> u-boot device id mapping\n\n"
2118 "<idmap> := <dev-id>=<mtd-id>\n"
2119 "<dev-id> := 'nand'|'nor'|'onenand'|'spi-nand'<dev-num>\n"
2120 "<dev-num> := mtd device number, 0...\n"
2121 "<mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)\n\n"
2122 "'mtdparts' - partition list\n\n"
2123 "mtdparts=mtdparts=<mtd-def>[;<mtd-def>...]\n\n"
2124 "<mtd-def> := <mtd-id>:<part-def>[,<part-def>...]\n"
2125 "<mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)\n"
2126 "<part-def> := <size>[@<offset>][<name>][<ro-flag>]\n"
2127 "<size> := standard linux memsize OR '-' to denote all remaining space\n"
2128 "<offset> := partition start offset within the device\n"
2130 "<ro-flag> := when set to 'ro' makes partition read-only (not used, passed to kernel)";