Lines Matching +full:bcm947xx +full:- +full:cfe +full:- +full:partitions

1 // SPDX-License-Identifier: GPL-2.0-only
13 #include <linux/mtd/partitions.h>
18 * NAND flash on Netgear R6250 was verified to contain 15 partitions.
57 part->name = name; in bcm47xxpart_add_part()
58 part->offset = offset; in bcm47xxpart_add_part()
59 part->mask_flags = mask_flags; in bcm47xxpart_add_part()
63 * bcm47xxpart_bootpartition - gets index of TRX partition used by bootloader
77 /* Check CFE environment variable */ in bcm47xxpart_bootpartition()
95 uint32_t blocksize = master->erasesize; in bcm47xxpart_parse()
96 int trx_parts[2]; /* Array with indexes of TRX partitions */ in bcm47xxpart_parse()
97 int trx_num = 0; /* Number of found TRX partitions */ in bcm47xxpart_parse()
102 * Some really old flashes (like AT45DB*) had smaller erasesize-s, but in bcm47xxpart_parse()
103 * partitions were aligned to at least 0x1000 anyway. in bcm47xxpart_parse()
112 return -ENOMEM; in bcm47xxpart_parse()
117 return -ENOMEM; in bcm47xxpart_parse()
121 for (offset = 0; offset <= master->size - blocksize; in bcm47xxpart_parse()
128 pr_warn("Reached maximum number of partitions, scanning stopped!\n"); in bcm47xxpart_parse()
200 * can't cover e.g. ever-changing rootfs partition. in bcm47xxpart_parse()
204 last_subpart = max3(trx->offset[0], trx->offset[1], in bcm47xxpart_parse()
205 trx->offset[2]); in bcm47xxpart_parse()
206 trx_size = max(trx->length, last_subpart + blocksize); in bcm47xxpart_parse()
212 offset += roundup(trx_size, blocksize) - blocksize; in bcm47xxpart_parse()
228 if (offset != master->size - blocksize && in bcm47xxpart_parse()
255 pr_warn("Reached maximum number of partitions, scanning stopped!\n"); in bcm47xxpart_parse()
259 offset = master->size - possible_nvram_sizes[i]; in bcm47xxpart_parse()
271 master->size - blocksize, 0); in bcm47xxpart_parse()
279 * Assume that partitions end at the beginning of the one they are in bcm47xxpart_parse()
283 u64 next_part_offset = (i < curr_part - 1) ? in bcm47xxpart_parse()
284 parts[i + 1].offset : master->size; in bcm47xxpart_parse()
286 parts[i].size = next_part_offset - parts[i].offset; in bcm47xxpart_parse()
294 trx->types = trx_types; in bcm47xxpart_parse()
296 trx->name = "failsafe"; in bcm47xxpart_parse()
304 { .compatible = "brcm,bcm947xx-cfe-partitions" },