Lines Matching +full:bcm4908 +full:- +full:partitions
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Flash partitions described by the OF (or flattened) device tree
17 #include <linux/mtd/partitions.h>
60 if (!master->parent) { /* Master */ in parse_fixed_partitions()
61 ofpart_node = of_get_child_by_name(mtd_node, "partitions"); in parse_fixed_partitions()
68 …pr_debug("%s: 'partitions' subnode not found on %pOF. Trying to parse direct subnodes as partition… in parse_fixed_partitions()
69 master->name, mtd_node); in parse_fixed_partitions()
79 /* The 'partitions' subnode might be used by another parser */ in parse_fixed_partitions()
83 quirks = of_id ? of_id->data : NULL; in parse_fixed_partitions()
99 return -ENOMEM; in parse_fixed_partitions()
114 master->name, pp, in parse_fixed_partitions()
118 nr_parts--; in parse_fixed_partitions()
129 * partitions as direct children of the nand controller. in parse_fixed_partitions()
131 * #size-cells equal to 0 and the firmware (e.g. in parse_fixed_partitions()
132 * U-Boot) just add the partitions there assuming in parse_fixed_partitions()
133 * 32-bit addressing. in parse_fixed_partitions()
140 …warn("%s: ofpart partition %pOF (%pOF) #size-cells is wrongly set to <0>, assuming <1> for parsing… in parse_fixed_partitions()
141 master->name, pp, mtd_node); in parse_fixed_partitions()
146 master->name, pp, in parse_fixed_partitions()
160 if (of_property_read_bool(pp, "read-only")) in parse_fixed_partitions()
166 if (of_property_read_bool(pp, "slc-mode")) in parse_fixed_partitions()
175 if (quirks && quirks->post_parse) in parse_fixed_partitions()
176 quirks->post_parse(master, parts, nr_parts); in parse_fixed_partitions()
183 master->name, pp, mtd_node); in parse_fixed_partitions()
184 ret = -EINVAL; in parse_fixed_partitions()
193 { .compatible = "fixed-partitions" },
195 { .compatible = "brcm,bcm4908-partitions", .data = &bcm4908_partitions_quirks, },
196 { .compatible = "linksys,ns-partitions", .data = &linksys_ns_partitions_quirks, },
203 .name = "fixed-partitions",
224 part = of_get_property(dp, "partitions", &plen); in parse_ofoldpart_partitions()
226 return 0; /* No partitions found */ in parse_ofoldpart_partitions()
234 return -ENOMEM; in parse_ofoldpart_partitions()
236 names = of_get_property(dp, "partition-names", &plen); in parse_ofoldpart_partitions()
239 parts[i].offset = be32_to_cpu(part->offset); in parse_ofoldpart_partitions()
240 parts[i].size = be32_to_cpu(part->len) & ~1; in parse_ofoldpart_partitions()
242 if (be32_to_cpu(part->len) & 1) in parse_ofoldpart_partitions()
249 plen -= len; in parse_ofoldpart_partitions()
291 MODULE_ALIAS("fixed-partitions");