Lines Matching full:part
36 const struct mtd_partition *part, in allocate_partition() argument
43 parent->part.size : parent->size; in allocate_partition()
51 name = kstrdup(part->name, GFP_KERNEL); in allocate_partition()
62 child->part.flags = parent->flags & ~part->mask_flags; in allocate_partition()
63 child->part.flags |= part->add_flags; in allocate_partition()
64 child->flags = child->part.flags; in allocate_partition()
65 child->part.size = part->size; in allocate_partition()
85 child->dev.of_node = part->of_node; in allocate_partition()
87 child->part.offset = part->offset; in allocate_partition()
90 if (child->part.offset == MTDPART_OFS_APPEND) in allocate_partition()
91 child->part.offset = cur_offset; in allocate_partition()
92 if (child->part.offset == MTDPART_OFS_NXTBLK) { in allocate_partition()
94 child->part.offset = cur_offset; in allocate_partition()
97 child->part.offset += wr_alignment - remainder; in allocate_partition()
101 child->part.offset); in allocate_partition()
104 if (child->part.offset == MTDPART_OFS_RETAIN) { in allocate_partition()
105 child->part.offset = cur_offset; in allocate_partition()
106 if (parent_size - child->part.offset >= child->part.size) { in allocate_partition()
107 child->part.size = parent_size - child->part.offset - in allocate_partition()
108 child->part.size; in allocate_partition()
111 part->name, parent_size - child->part.offset, in allocate_partition()
112 child->part.size); in allocate_partition()
117 if (child->part.size == MTDPART_SIZ_FULL) in allocate_partition()
118 child->part.size = parent_size - child->part.offset; in allocate_partition()
121 child->part.offset, child->part.offset + child->part.size, in allocate_partition()
125 if (child->part.offset >= parent_size) { in allocate_partition()
127 child->part.offset = 0; in allocate_partition()
128 child->part.size = 0; in allocate_partition()
133 part->name); in allocate_partition()
136 if (child->part.offset + child->part.size > parent->size) { in allocate_partition()
137 child->part.size = parent_size - child->part.offset; in allocate_partition()
139 part->name, parent->name, child->part.size); in allocate_partition()
145 u64 end = child->part.offset + child->part.size; in allocate_partition()
148 /* Find the first erase regions which is part of this in allocate_partition()
150 for (i = 0; i < max && regions[i].offset <= child->part.offset; in allocate_partition()
184 part->name); in allocate_partition()
187 tmp = mtd_get_master_ofs(child, 0) + child->part.size; in allocate_partition()
192 part->name); in allocate_partition()
195 child->size = child->part.size; in allocate_partition()
203 while (offs < child->part.size) { in allocate_partition()
221 return sysfs_emit(buf, "%lld\n", mtd->part.offset); in offset_show()
244 parent->part.size : parent->size; in mtd_add_partition()
245 struct mtd_partition part; in mtd_add_partition() local
260 memset(&part, 0, sizeof(part)); in mtd_add_partition()
261 part.name = name; in mtd_add_partition()
262 part.size = length; in mtd_add_partition()
263 part.offset = offset; in mtd_add_partition()
265 child = allocate_partition(parent, &part, -1, offset); in mtd_add_partition()
270 list_add_tail(&child->part.node, &parent->partitions); in mtd_add_partition()
283 list_del(&child->part.node); in mtd_add_partition()
304 list_for_each_entry_safe(child, next, &mtd->partitions, part.node) { in __mtd_del_partition()
316 list_del(&mtd->part.node); in __mtd_del_partition()
332 list_for_each_entry_safe(child, next, &mtd->partitions, part.node) { in __del_mtd_partitions()
345 list_del(&child->part.node); in __del_mtd_partitions()
372 list_for_each_entry(child, &mtd->partitions, part.node) { in mtd_del_partition()
412 list_add_tail(&child->part.node, &parent->partitions); in add_mtd_partitions()
418 list_del(&child->part.node); in add_mtd_partitions()
430 cur_offset = child->part.offset + child->part.size; in add_mtd_partitions()