Lines Matching refs:parts
23 int (*post_parse)(struct mtd_info *mtd, struct mtd_partition *parts, int nr_parts);
47 struct mtd_partition *parts; in parse_fixed_partitions() local
97 parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL); in parse_fixed_partitions()
98 if (!parts) in parse_fixed_partitions()
132 parts[i].offset = of_read_number(reg, a_cells); in parse_fixed_partitions()
133 parts[i].size = of_read_number(reg + a_cells, s_cells); in parse_fixed_partitions()
134 parts[i].of_node = pp; in parse_fixed_partitions()
139 parts[i].name = partname; in parse_fixed_partitions()
142 parts[i].mask_flags |= MTD_WRITEABLE; in parse_fixed_partitions()
145 parts[i].mask_flags |= MTD_POWERUP_LOCK; in parse_fixed_partitions()
148 parts[i].add_flags |= MTD_SLC_ON_MLC_EMULATION; in parse_fixed_partitions()
157 quirks->post_parse(master, parts, nr_parts); in parse_fixed_partitions()
159 *pparts = parts; in parse_fixed_partitions()
168 kfree(parts); in parse_fixed_partitions()
192 struct mtd_partition *parts; in parse_ofoldpart_partitions() local
213 parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL); in parse_ofoldpart_partitions()
214 if (!parts) in parse_ofoldpart_partitions()
220 parts[i].offset = be32_to_cpu(part->offset); in parse_ofoldpart_partitions()
221 parts[i].size = be32_to_cpu(part->len) & ~1; in parse_ofoldpart_partitions()
224 parts[i].mask_flags = MTD_WRITEABLE; in parse_ofoldpart_partitions()
229 parts[i].name = names; in parse_ofoldpart_partitions()
233 parts[i].name = "unnamed"; in parse_ofoldpart_partitions()
239 *pparts = parts; in parse_ofoldpart_partitions()