• Home
  • Raw
  • Download

Lines Matching refs:part

35 					   const struct mtd_partition *part,  in allocate_partition()  argument
42 parent->part.size : parent->size; in allocate_partition()
50 name = kstrdup(part->name, GFP_KERNEL); in allocate_partition()
61 child->part.flags = parent->flags & ~part->mask_flags; in allocate_partition()
62 child->part.flags |= part->add_flags; in allocate_partition()
63 child->flags = child->part.flags; in allocate_partition()
64 child->part.size = part->size; in allocate_partition()
84 child->dev.of_node = part->of_node; in allocate_partition()
86 child->part.offset = part->offset; in allocate_partition()
89 if (child->part.offset == MTDPART_OFS_APPEND) in allocate_partition()
90 child->part.offset = cur_offset; in allocate_partition()
91 if (child->part.offset == MTDPART_OFS_NXTBLK) { in allocate_partition()
93 child->part.offset = cur_offset; in allocate_partition()
96 child->part.offset += wr_alignment - remainder; in allocate_partition()
100 child->part.offset); in allocate_partition()
103 if (child->part.offset == MTDPART_OFS_RETAIN) { in allocate_partition()
104 child->part.offset = cur_offset; in allocate_partition()
105 if (parent_size - child->part.offset >= child->part.size) { in allocate_partition()
106 child->part.size = parent_size - child->part.offset - in allocate_partition()
107 child->part.size; in allocate_partition()
110 part->name, parent_size - child->part.offset, in allocate_partition()
111 child->part.size); in allocate_partition()
116 if (child->part.size == MTDPART_SIZ_FULL) in allocate_partition()
117 child->part.size = parent_size - child->part.offset; in allocate_partition()
120 child->part.offset, child->part.offset + child->part.size, in allocate_partition()
124 if (child->part.offset >= parent_size) { in allocate_partition()
126 child->part.offset = 0; in allocate_partition()
127 child->part.size = 0; in allocate_partition()
132 part->name); in allocate_partition()
135 if (child->part.offset + child->part.size > parent->size) { in allocate_partition()
136 child->part.size = parent_size - child->part.offset; in allocate_partition()
138 part->name, parent->name, child->part.size); in allocate_partition()
144 u64 end = child->part.offset + child->part.size; in allocate_partition()
149 for (i = 0; i < max && regions[i].offset <= child->part.offset; in allocate_partition()
183 part->name); in allocate_partition()
186 tmp = mtd_get_master_ofs(child, 0) + child->part.size; in allocate_partition()
191 part->name); in allocate_partition()
194 child->size = child->part.size; in allocate_partition()
202 while (offs < child->part.size) { in allocate_partition()
220 return snprintf(buf, PAGE_SIZE, "%lld\n", mtd->part.offset); in mtd_partition_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()