^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Flash partitions described by the OF (or flattened) device tree
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright © 2006 MontaVista Software Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Author: Vitaly Wool <vwool@ru.mvista.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Revised to handle newer style flash binding by:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Copyright © 2007 David Gibson, IBM Corporation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/mtd/mtd.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/mtd/partitions.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) static bool node_has_compatible(struct device_node *pp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) return of_get_property(pp, "compatible", NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) static int parse_fixed_partitions(struct mtd_info *master,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) const struct mtd_partition **pparts,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) struct mtd_part_parser_data *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) struct mtd_partition *parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) struct device_node *mtd_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) struct device_node *ofpart_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) const char *partname;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) struct device_node *pp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) int nr_parts, i, ret = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) bool dedicated = true;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) /* Pull of_node from the master device node */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) mtd_node = mtd_get_of_node(master);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) if (!mtd_node)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) ofpart_node = of_get_child_by_name(mtd_node, "partitions");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) if (!ofpart_node) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) * We might get here even when ofpart isn't used at all (e.g.,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * when using another parser), so don't be louder than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) * KERN_DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) pr_debug("%s: 'partitions' subnode not found on %pOF. Trying to parse direct subnodes as partitions.\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) master->name, mtd_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) ofpart_node = mtd_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) dedicated = false;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) } else if (!of_device_is_compatible(ofpart_node, "fixed-partitions")) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) /* The 'partitions' subnode might be used by another parser */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) /* First count the subnodes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) nr_parts = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) for_each_child_of_node(ofpart_node, pp) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) if (!dedicated && node_has_compatible(pp))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) continue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) nr_parts++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) if (nr_parts == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) if (!parts)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) i = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) for_each_child_of_node(ofpart_node, pp) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) const __be32 *reg;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) int len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) int a_cells, s_cells;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) if (!dedicated && node_has_compatible(pp))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) continue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) reg = of_get_property(pp, "reg", &len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) if (!reg) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) if (dedicated) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) pr_debug("%s: ofpart partition %pOF (%pOF) missing reg property.\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) master->name, pp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) mtd_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) goto ofpart_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) nr_parts--;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) continue;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) a_cells = of_n_addr_cells(pp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) s_cells = of_n_size_cells(pp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) if (len / 4 != a_cells + s_cells) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) pr_debug("%s: ofpart partition %pOF (%pOF) error parsing reg property.\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) master->name, pp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) mtd_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) goto ofpart_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) parts[i].offset = of_read_number(reg, a_cells);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) parts[i].size = of_read_number(reg + a_cells, s_cells);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) parts[i].of_node = pp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) partname = of_get_property(pp, "label", &len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) if (!partname)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) partname = of_get_property(pp, "name", &len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) parts[i].name = partname;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) if (of_get_property(pp, "read-only", &len))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) parts[i].mask_flags |= MTD_WRITEABLE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) if (of_get_property(pp, "lock", &len))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) parts[i].mask_flags |= MTD_POWERUP_LOCK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) if (of_property_read_bool(pp, "slc-mode"))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) parts[i].add_flags |= MTD_SLC_ON_MLC_EMULATION;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) i++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) if (!nr_parts)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) goto ofpart_none;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) *pparts = parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) return nr_parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) ofpart_fail:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) pr_err("%s: error parsing ofpart partition %pOF (%pOF)\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) master->name, pp, mtd_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) ret = -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) ofpart_none:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) of_node_put(pp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) kfree(parts);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) static const struct of_device_id parse_ofpart_match_table[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) { .compatible = "fixed-partitions" },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) {},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) MODULE_DEVICE_TABLE(of, parse_ofpart_match_table);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) static struct mtd_part_parser ofpart_parser = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) .parse_fn = parse_fixed_partitions,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) .name = "fixed-partitions",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) .of_match_table = parse_ofpart_match_table,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) static int parse_ofoldpart_partitions(struct mtd_info *master,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) const struct mtd_partition **pparts,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) struct mtd_part_parser_data *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) struct mtd_partition *parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) struct device_node *dp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) int i, plen, nr_parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) const struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) __be32 offset, len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) } *part;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) const char *names;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) /* Pull of_node from the master device node */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) dp = mtd_get_of_node(master);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) if (!dp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) part = of_get_property(dp, "partitions", &plen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) if (!part)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) return 0; /* No partitions found */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) pr_warn("Device tree uses obsolete partition map binding: %pOF\n", dp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) nr_parts = plen / sizeof(part[0]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) if (!parts)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) names = of_get_property(dp, "partition-names", &plen);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) for (i = 0; i < nr_parts; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) parts[i].offset = be32_to_cpu(part->offset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) parts[i].size = be32_to_cpu(part->len) & ~1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) /* bit 0 set signifies read only partition */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) if (be32_to_cpu(part->len) & 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) parts[i].mask_flags = MTD_WRITEABLE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) if (names && (plen > 0)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) int len = strlen(names) + 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) parts[i].name = names;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) plen -= len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) names += len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) parts[i].name = "unnamed";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) part++;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) *pparts = parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) return nr_parts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) static struct mtd_part_parser ofoldpart_parser = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) .parse_fn = parse_ofoldpart_partitions,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) .name = "ofoldpart",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) static int __init ofpart_parser_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) register_mtd_parser(&ofpart_parser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) register_mtd_parser(&ofoldpart_parser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) static void __exit ofpart_parser_exit(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) deregister_mtd_parser(&ofpart_parser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) deregister_mtd_parser(&ofoldpart_parser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) module_init(ofpart_parser_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) module_exit(ofpart_parser_exit);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) MODULE_LICENSE("GPL");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) MODULE_DESCRIPTION("Parser for MTD partitioning information in device tree");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) MODULE_AUTHOR("Vitaly Wool, David Gibson");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) * When MTD core cannot find the requested parser, it tries to load the module
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) * with the same name. Since we provide the ofoldpart parser, we should have
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) * the corresponding alias.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) MODULE_ALIAS("fixed-partitions");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) MODULE_ALIAS("ofoldpart");