Lines Matching full:master
45 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() local
47 master->writesize : master->erasesize; in allocate_partition()
83 * However, it is very useful to have the master node present, in allocate_partition()
84 * so the MTD_PARTITIONED_MASTER option allows that. The master in allocate_partition()
171 child->erasesize = master->erasesize; in allocate_partition()
206 if (master->_block_isbad) { in allocate_partition()
248 struct mtd_info *master = mtd_get_master(parent); in mtd_add_partition() local
275 mutex_lock(&master->master.partitions_lock); in mtd_add_partition()
277 mutex_unlock(&master->master.partitions_lock); in mtd_add_partition()
288 mutex_lock(&master->master.partitions_lock); in mtd_add_partition()
290 mutex_unlock(&master->master.partitions_lock); in mtd_add_partition()
355 struct mtd_info *master = mtd_get_master(mtd); in del_mtd_partitions() local
360 mutex_lock(&master->master.partitions_lock); in del_mtd_partitions()
362 mutex_unlock(&master->master.partitions_lock); in del_mtd_partitions()
369 struct mtd_info *child, *master = mtd_get_master(mtd); in mtd_del_partition() local
372 mutex_lock(&master->master.partitions_lock); in mtd_del_partition()
379 mutex_unlock(&master->master.partitions_lock); in mtd_del_partition()
398 struct mtd_info *child, *master = mtd_get_master(parent); in add_mtd_partitions() local
412 mutex_lock(&master->master.partitions_lock); in add_mtd_partitions()
414 mutex_unlock(&master->master.partitions_lock); in add_mtd_partitions()
418 mutex_lock(&master->master.partitions_lock); in add_mtd_partitions()
420 mutex_unlock(&master->master.partitions_lock); in add_mtd_partitions()
441 del_mtd_partitions(master); in add_mtd_partitions()
521 struct mtd_info *master, in mtd_part_do_parse() argument
527 ret = (*parser->parse_fn)(master, &pparts->parts, data); in mtd_part_do_parse()
528 pr_debug("%s: parser %s: %i\n", master->name, parser->name, ret); in mtd_part_do_parse()
533 parser->name, master->name); in mtd_part_do_parse()
580 static int mtd_part_of_parse(struct mtd_info *master, in mtd_part_of_parse() argument
592 dev = &master->dev; in mtd_part_of_parse()
594 if (!IS_ENABLED(CONFIG_MTD_PARTITIONED_MASTER) && !mtd_is_partition(master)) in mtd_part_of_parse()
595 dev = master->dev.parent; in mtd_part_of_parse()
597 np = mtd_get_of_node(master); in mtd_part_of_parse()
598 if (mtd_is_partition(master)) in mtd_part_of_parse()
616 ret = mtd_part_do_parse(parser, master, pparts, NULL); in mtd_part_of_parse()
639 ret = mtd_part_do_parse(parser, master, pparts, NULL); in mtd_part_of_parse()
653 * @master: the master partition (describes whole MTD device)
657 * This function tries to find & register partitions on MTD device @master. It
668 int parse_mtd_partitions(struct mtd_info *master, const char *const *types, in parse_mtd_partitions() argument
676 types = mtd_is_partition(master) ? default_subpartition_types : in parse_mtd_partitions()
686 ret = mtd_part_of_parse(master, &pparts); in parse_mtd_partitions()
688 pr_debug("%s: parsing partitions %s\n", master->name, in parse_mtd_partitions()
693 pr_debug("%s: got parser %s\n", master->name, in parse_mtd_partitions()
697 ret = mtd_part_do_parse(parser, master, &pparts, data); in parse_mtd_partitions()
703 err = add_mtd_partitions(master, pparts.parts, in parse_mtd_partitions()
737 struct mtd_info *master = mtd_get_master((struct mtd_info *)mtd); in mtd_get_device_size() local
739 return master->size; in mtd_get_device_size()