Lines Matching +full:scpart +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * drivers/mtd/scpart.c: Sercomm Partition Parser
15 #define MOD_NAME "scpart"
42 return ((pdesc->part_id != 0xffffffffUL) && in scpart_desc_is_valid()
43 (pdesc->part_offs != 0xffffffffUL) && in scpart_desc_is_valid()
44 (pdesc->part_bytes != 0xffffffffUL)); in scpart_desc_is_valid()
59 buf = kzalloc(master->erasesize, GFP_KERNEL); in scpart_scan_partmap()
61 res = -ENOMEM; in scpart_scan_partmap()
65 res2 = mtd_read(master, partmap_offs, master->erasesize, &retlen, buf); in scpart_scan_partmap()
66 if (res2 || retlen != master->erasesize) { in scpart_scan_partmap()
67 res = -EIO; in scpart_scan_partmap()
72 offs < master->erasesize - sizeof(*tmpdesc); in scpart_scan_partmap()
85 res = -ENOMEM; in scpart_scan_partmap()
112 (offs < master->size) && in scpart_find_partmap()
116 res = -EIO; in scpart_find_partmap()
126 offs += master->erasesize; in scpart_find_partmap()
155 res = -ENOENT; in scpart_parse()
162 master->name, mtd_node); in scpart_parse()
163 res = -ENOENT; in scpart_parse()
170 res = -ENOENT; in scpart_parse()
177 res = -ENOMEM; in scpart_parse()
184 if (of_property_read_u32(pp, "sercomm,scpart-id", &scpart_id)) in scpart_parse()
202 if (of_property_read_bool(pp, "read-only")) in scpart_parse()
217 pr_info("No partition in OF matches partition ID with 'SC PART MAP'.\n"); in scpart_parse()
232 { .compatible = "sercomm,sc-partitions" },
239 .name = "scpart",
245 MODULE_ALIAS("scpart");