/kernel/linux/linux-6.6/block/partitions/ |
H A D | cmdline.c | 109 static void free_subpart(struct cmdline_parts *parts) in free_subpart() argument 113 while (parts->subpart) { in free_subpart() 114 subpart = parts->subpart; in free_subpart() 115 parts->subpart = subpart->next_subpart; in free_subpart() 120 static int parse_parts(struct cmdline_parts **parts, const char *bdevdef) in parse_parts() argument 129 *parts = NULL; in parse_parts() 170 *parts = newparts; in parse_parts() 179 static void cmdline_parts_free(struct cmdline_parts **parts) in cmdline_parts_free() argument 183 while (*parts) { in cmdline_parts_free() 184 next_parts = (*parts) in cmdline_parts_free() 191 cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline) cmdline_parts_parse() argument 239 cmdline_parts_find(struct cmdline_parts *parts, const char *bdev) cmdline_parts_find() argument 277 cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, struct parsed_partitions *state) cmdline_parts_set() argument 379 struct cmdline_parts *parts; cmdline_partition() local [all...] |
/kernel/linux/linux-5.10/drivers/mtd/parsers/ |
H A D | cmdlinepart.c | 23 * <size> and <offset> can be specified such that the parts are out of order 26 * The parts are assigned MTD numbers in the order they are specified in the 63 struct mtd_partition *parts; member 89 struct mtd_partition *parts; in newpart() local 169 parts = newpart(s + 1, &s, num_parts, this_part + 1, in newpart() 171 if (IS_ERR(parts)) in newpart() 172 return parts; in newpart() 181 parts = kzalloc(alloc_size, GFP_KERNEL); in newpart() 182 if (!parts) in newpart() 184 extra_mem = (unsigned char *)(parts in newpart() 227 struct mtd_partition *parts; mtdpart_setup_real() local [all...] |
H A D | ofpart.c | 28 struct mtd_partition *parts; in parse_fixed_partitions() local 70 parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL); in parse_fixed_partitions() 71 if (!parts) in parse_fixed_partitions() 105 parts[i].offset = of_read_number(reg, a_cells); in parse_fixed_partitions() 106 parts[i].size = of_read_number(reg + a_cells, s_cells); in parse_fixed_partitions() 107 parts[i].of_node = pp; in parse_fixed_partitions() 112 parts[i].name = partname; in parse_fixed_partitions() 115 parts[i].mask_flags |= MTD_WRITEABLE; in parse_fixed_partitions() 118 parts[ in parse_fixed_partitions() 158 struct mtd_partition *parts; parse_ofoldpart_partitions() local [all...] |
H A D | bcm63xxpart.c | 83 struct mtd_partition *parts; in bcm63xx_parse_cfe_nor_partitions() local 96 parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); in bcm63xx_parse_cfe_nor_partitions() 97 if (!parts) in bcm63xx_parse_cfe_nor_partitions() 101 parts[curpart].name = "CFE"; in bcm63xx_parse_cfe_nor_partitions() 102 parts[curpart].offset = 0; in bcm63xx_parse_cfe_nor_partitions() 103 parts[curpart].size = cfelen; in bcm63xx_parse_cfe_nor_partitions() 106 parts[curpart].name = "nvram"; in bcm63xx_parse_cfe_nor_partitions() 107 parts[curpart].offset = master->size - nvramlen; in bcm63xx_parse_cfe_nor_partitions() 108 parts[curpar in bcm63xx_parse_cfe_nor_partitions() [all...] |
H A D | bcm47xxpart.c | 90 struct mtd_partition *parts; in bcm47xxpart_parse() local 109 parts = kcalloc(BCM47XXPART_MAX_PARTS, sizeof(struct mtd_partition), in bcm47xxpart_parse() 111 if (!parts) in bcm47xxpart_parse() 116 kfree(parts); in bcm47xxpart_parse() 144 bcm47xxpart_add_part(&parts[curr_part++], "boot", in bcm47xxpart_parse() 154 bcm47xxpart_add_part(&parts[curr_part++], "board_data", in bcm47xxpart_parse() 161 bcm47xxpart_add_part(&parts[curr_part++], "factory", in bcm47xxpart_parse() 169 bcm47xxpart_add_part(&parts[curr_part++], "POT", offset, in bcm47xxpart_parse() 177 bcm47xxpart_add_part(&parts[curr_part++], "ML", offset, in bcm47xxpart_parse() 193 bcm47xxpart_add_part(&parts[curr_par in bcm47xxpart_parse() [all...] |
H A D | parser_trx.c | 54 struct mtd_partition *parts; in parser_trx_parse() local 61 parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition), in parser_trx_parse() 63 if (!parts) in parser_trx_parse() 69 kfree(parts); in parser_trx_parse() 74 kfree(parts); in parser_trx_parse() 80 part = &parts[curr_part++]; in parser_trx_parse() 87 part = &parts[curr_part++]; in parser_trx_parse() 94 part = &parts[curr_part++]; in parser_trx_parse() 106 parts[i + 1].offset : mtd->size; in parser_trx_parse() 108 parts[ in parser_trx_parse() [all...] |
H A D | parser_imagetag.c | 66 struct mtd_partition *parts; in bcm963xx_parse_imagetag_partitions() local 153 parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); in bcm963xx_parse_imagetag_partitions() 154 if (!parts) { in bcm963xx_parse_imagetag_partitions() 165 parts[kernelpart].name = "kernel"; in bcm963xx_parse_imagetag_partitions() 166 parts[kernelpart].offset = kerneladdr; in bcm963xx_parse_imagetag_partitions() 167 parts[kernelpart].size = kernellen; in bcm963xx_parse_imagetag_partitions() 176 parts[rootfspart].name = "rootfs"; in bcm963xx_parse_imagetag_partitions() 177 parts[rootfspart].offset = rootfsaddr; in bcm963xx_parse_imagetag_partitions() 178 parts[rootfspar in bcm963xx_parse_imagetag_partitions() [all...] |
H A D | redboot.c | 78 struct mtd_partition *parts; in parse_redboot_partitions() local 243 parts = kzalloc(sizeof(*parts)*nrparts + nulllen + namelen, GFP_KERNEL); in parse_redboot_partitions() 245 if (!parts) { in parse_redboot_partitions() 250 nullname = (char *)&parts[nrparts]; in parse_redboot_partitions() 262 parts[0].name = nullname; in parse_redboot_partitions() 263 parts[0].size = fl->img->flash_base; in parse_redboot_partitions() 264 parts[0].offset = 0; in parse_redboot_partitions() 269 parts[i].size = fl->img->size; in parse_redboot_partitions() 270 parts[ in parse_redboot_partitions() [all...] |
/kernel/linux/linux-6.6/drivers/mtd/parsers/ |
H A D | cmdlinepart.c | 23 * <size> and <offset> can be specified such that the parts are out of order 26 * The parts are assigned MTD numbers in the order they are specified in the 63 struct mtd_partition *parts; member 89 struct mtd_partition *parts; in newpart() local 169 parts = newpart(s + 1, &s, num_parts, this_part + 1, in newpart() 171 if (IS_ERR(parts)) in newpart() 172 return parts; in newpart() 181 parts = kzalloc(alloc_size, GFP_KERNEL); in newpart() 182 if (!parts) in newpart() 184 extra_mem = (unsigned char *)(parts in newpart() 227 struct mtd_partition *parts; mtdpart_setup_real() local [all...] |
H A D | ofpart_core.c | 23 int (*post_parse)(struct mtd_info *mtd, struct mtd_partition *parts, int nr_parts); 47 struct mtd_partition *parts; in parse_fixed_partitions() local 97 parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL); in parse_fixed_partitions() 98 if (!parts) in parse_fixed_partitions() 151 parts[i].offset = of_read_number(reg, a_cells); in parse_fixed_partitions() 152 parts[i].size = of_read_number(reg + a_cells, s_cells); in parse_fixed_partitions() 153 parts[i].of_node = pp; in parse_fixed_partitions() 158 parts[i].name = partname; in parse_fixed_partitions() 161 parts[ in parse_fixed_partitions() 211 struct mtd_partition *parts; parse_ofoldpart_partitions() local [all...] |
H A D | bcm63xxpart.c | 83 struct mtd_partition *parts; in bcm63xx_parse_cfe_nor_partitions() local 96 parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); in bcm63xx_parse_cfe_nor_partitions() 97 if (!parts) in bcm63xx_parse_cfe_nor_partitions() 101 parts[curpart].name = "CFE"; in bcm63xx_parse_cfe_nor_partitions() 102 parts[curpart].offset = 0; in bcm63xx_parse_cfe_nor_partitions() 103 parts[curpart].size = cfelen; in bcm63xx_parse_cfe_nor_partitions() 106 parts[curpart].name = "nvram"; in bcm63xx_parse_cfe_nor_partitions() 107 parts[curpart].offset = master->size - nvramlen; in bcm63xx_parse_cfe_nor_partitions() 108 parts[curpar in bcm63xx_parse_cfe_nor_partitions() [all...] |
H A D | bcm47xxpart.c | 90 struct mtd_partition *parts; in bcm47xxpart_parse() local 109 parts = kcalloc(BCM47XXPART_MAX_PARTS, sizeof(struct mtd_partition), in bcm47xxpart_parse() 111 if (!parts) in bcm47xxpart_parse() 116 kfree(parts); in bcm47xxpart_parse() 144 bcm47xxpart_add_part(&parts[curr_part++], "boot", in bcm47xxpart_parse() 154 bcm47xxpart_add_part(&parts[curr_part++], "board_data", in bcm47xxpart_parse() 161 bcm47xxpart_add_part(&parts[curr_part++], "factory", in bcm47xxpart_parse() 169 bcm47xxpart_add_part(&parts[curr_part++], "POT", offset, in bcm47xxpart_parse() 177 bcm47xxpart_add_part(&parts[curr_part++], "ML", offset, in bcm47xxpart_parse() 193 bcm47xxpart_add_part(&parts[curr_par in bcm47xxpart_parse() [all...] |
H A D | parser_trx.c | 55 struct mtd_partition *parts; in parser_trx_parse() local 68 parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition), in parser_trx_parse() 70 if (!parts) in parser_trx_parse() 76 kfree(parts); in parser_trx_parse() 81 kfree(parts); in parser_trx_parse() 87 part = &parts[curr_part++]; in parser_trx_parse() 94 part = &parts[curr_part++]; in parser_trx_parse() 101 part = &parts[curr_part++]; in parser_trx_parse() 113 parts[i + 1].offset : mtd->size; in parser_trx_parse() 115 parts[ in parser_trx_parse() [all...] |
H A D | tplink_safeloader.c | 77 struct mtd_partition *parts; in mtd_parser_tplink_safeloader_parse() local 85 parts = kcalloc(TPLINK_SAFELOADER_MAX_PARTS, sizeof(*parts), GFP_KERNEL); in mtd_parser_tplink_safeloader_parse() 86 if (!parts) { in mtd_parser_tplink_safeloader_parse() 100 name, &parts[idx].offset, &parts[idx].size, &bytes) == 3; in mtd_parser_tplink_safeloader_parse() 102 parts[idx].name = kstrdup(name, GFP_KERNEL); in mtd_parser_tplink_safeloader_parse() 103 if (!parts[idx].name) { in mtd_parser_tplink_safeloader_parse() 114 *pparts = parts; in mtd_parser_tplink_safeloader_parse() 120 kfree(parts[id in mtd_parser_tplink_safeloader_parse() [all...] |
H A D | parser_imagetag.c | 66 struct mtd_partition *parts; in bcm963xx_parse_imagetag_partitions() local 153 parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); in bcm963xx_parse_imagetag_partitions() 154 if (!parts) { in bcm963xx_parse_imagetag_partitions() 165 parts[kernelpart].name = "kernel"; in bcm963xx_parse_imagetag_partitions() 166 parts[kernelpart].offset = kerneladdr; in bcm963xx_parse_imagetag_partitions() 167 parts[kernelpart].size = kernellen; in bcm963xx_parse_imagetag_partitions() 176 parts[rootfspart].name = "rootfs"; in bcm963xx_parse_imagetag_partitions() 177 parts[rootfspart].offset = rootfsaddr; in bcm963xx_parse_imagetag_partitions() 178 parts[rootfspar in bcm963xx_parse_imagetag_partitions() [all...] |
H A D | redboot.c | 78 struct mtd_partition *parts; in parse_redboot_partitions() local 242 parts = kzalloc(sizeof(*parts) * nrparts + nulllen + namelen, GFP_KERNEL); in parse_redboot_partitions() 244 if (!parts) { in parse_redboot_partitions() 249 nullname = (char *)&parts[nrparts]; in parse_redboot_partitions() 260 parts[0].name = nullname; in parse_redboot_partitions() 261 parts[0].size = fl->img->flash_base; in parse_redboot_partitions() 262 parts[0].offset = 0; in parse_redboot_partitions() 267 parts[i].size = fl->img->size; in parse_redboot_partitions() 268 parts[ in parse_redboot_partitions() [all...] |
H A D | brcm_u-boot.c | 34 struct mtd_partition *parts; in brcm_u_boot_parse() local 40 parts = kcalloc(BRCM_U_BOOT_MAX_PARTS, sizeof(*parts), GFP_KERNEL); in brcm_u_boot_parse() 41 if (!parts) in brcm_u_boot_parse() 56 parts[i].name = names[i]; in brcm_u_boot_parse() 57 parts[i].offset = offset; in brcm_u_boot_parse() 58 parts[i].size = sizeof(header) + le32_to_cpu(header.length); in brcm_u_boot_parse() 66 *pparts = parts; in brcm_u_boot_parse()
|
H A D | qcomsmempart.c | 65 struct mtd_partition *parts; in parse_qcomsmem_part() local 126 parts = kcalloc(numparts, sizeof(*parts), GFP_KERNEL); in parse_qcomsmem_part() 127 if (!parts) in parse_qcomsmem_part() 145 parts[j].name = name; in parse_qcomsmem_part() 146 parts[j].offset = le32_to_cpu(pentry->offset) * mtd->erasesize; in parse_qcomsmem_part() 147 parts[j].mask_flags = pentry->attr; in parse_qcomsmem_part() 148 parts[j].size = le32_to_cpu(pentry->length) * mtd->erasesize; in parse_qcomsmem_part() 157 *pparts = parts; in parse_qcomsmem_part() 163 kfree(parts[ in parse_qcomsmem_part() [all...] |
H A D | scpart.c | 148 struct mtd_partition *parts = NULL; in scpart_parse() local 174 parts = kcalloc(of_get_child_count(ofpart_node), sizeof(*parts), in scpart_parse() 176 if (!parts) { in scpart_parse() 196 parts[nr_parts].offset = scpart_map[n].part_offs; in scpart_parse() 197 parts[nr_parts].size = scpart_map[n].part_bytes; in scpart_parse() 198 parts[nr_parts].of_node = pp; in scpart_parse() 201 parts[nr_parts].name = partname; in scpart_parse() 203 parts[nr_parts].mask_flags |= MTD_WRITEABLE; in scpart_parse() 205 parts[nr_part in scpart_parse() [all...] |
/kernel/linux/linux-5.10/block/ |
H A D | cmdline-parser.c | 79 static void free_subpart(struct cmdline_parts *parts) in free_subpart() argument 83 while (parts->subpart) { in free_subpart() 84 subpart = parts->subpart; in free_subpart() 85 parts->subpart = subpart->next_subpart; in free_subpart() 90 static int parse_parts(struct cmdline_parts **parts, const char *bdevdef) in parse_parts() argument 99 *parts = NULL; in parse_parts() 142 *parts = newparts; in parse_parts() 151 void cmdline_parts_free(struct cmdline_parts **parts) in cmdline_parts_free() argument 155 while (*parts) { in cmdline_parts_free() 156 next_parts = (*parts) in cmdline_parts_free() 164 cmdline_parts_parse(struct cmdline_parts **parts, const char *cmdline) cmdline_parts_parse() argument 212 cmdline_parts_find(struct cmdline_parts *parts, const char *bdev) cmdline_parts_find() argument 226 cmdline_parts_set(struct cmdline_parts *parts, sector_t disk_size, int slot, int (*add_part)(int, struct cmdline_subpart *, void *), void *param) cmdline_parts_set() argument [all...] |
/kernel/linux/linux-5.10/arch/mips/alchemy/devboards/ |
H A D | platform.c | 157 struct mtd_partition *parts; in db1x_register_norflash() local 165 parts = kcalloc(5, sizeof(struct mtd_partition), GFP_KERNEL); in db1x_register_norflash() 166 if (!parts) in db1x_register_norflash() 192 parts[i].offset = 0; in db1x_register_norflash() 193 parts[i].name = "User FS"; in db1x_register_norflash() 194 parts[i].size = size / 2; in db1x_register_norflash() 198 parts[i].offset = MTDPART_OFS_APPEND; in db1x_register_norflash() 199 parts[i].name = "User FS 2"; in db1x_register_norflash() 200 parts[i].size = (size / 2) - (0x20000000 - 0x1fc00000); in db1x_register_norflash() 203 parts[ in db1x_register_norflash() [all...] |
/kernel/linux/linux-6.6/arch/mips/alchemy/devboards/ |
H A D | platform.c | 157 struct mtd_partition *parts; in db1x_register_norflash() local 165 parts = kcalloc(5, sizeof(struct mtd_partition), GFP_KERNEL); in db1x_register_norflash() 166 if (!parts) in db1x_register_norflash() 192 parts[i].offset = 0; in db1x_register_norflash() 193 parts[i].name = "User FS"; in db1x_register_norflash() 194 parts[i].size = size / 2; in db1x_register_norflash() 198 parts[i].offset = MTDPART_OFS_APPEND; in db1x_register_norflash() 199 parts[i].name = "User FS 2"; in db1x_register_norflash() 200 parts[i].size = (size / 2) - (0x20000000 - 0x1fc00000); in db1x_register_norflash() 203 parts[ in db1x_register_norflash() [all...] |
/kernel/linux/linux-5.10/block/partitions/ |
H A D | cmdline.c | 38 info = &state->parts[slot].info; in add_part() 48 state->parts[slot].has_info = true; in add_part() 92 for (; slot < state->limit && state->parts[slot].has_info; slot++) { in cmdline_parts_verifier() 93 for (i = slot+1; i < state->limit && state->parts[i].has_info; in cmdline_parts_verifier() 95 if (has_overlaps(state->parts[slot].from, in cmdline_parts_verifier() 96 state->parts[slot].size, in cmdline_parts_verifier() 97 state->parts[i].from, in cmdline_parts_verifier() 98 state->parts[i].size)) { in cmdline_parts_verifier() 105 state->parts[slot].info.volname, in cmdline_parts_verifier() 106 (u64)state->parts[slo in cmdline_parts_verifier() 127 struct cmdline_parts *parts; cmdline_partition() local [all...] |
/kernel/linux/linux-5.10/drivers/regulator/ |
H A D | qcom_rpm-regulator.c | 45 (((reg)->parts->fm.mask >> (reg)->parts->fm.shift) == 3) 53 const struct rpm_reg_parts *parts; member 203 vreg->parts->request_len); in rpm_reg_write() 210 const struct rpm_reg_parts *parts = vreg->parts; in rpm_reg_set_mV_sel() local 211 const struct request_member *req = &parts->mV; in rpm_reg_set_mV_sel() 237 const struct rpm_reg_parts *parts = vreg->parts; in rpm_reg_set_uV_sel() local 238 const struct request_member *req = &parts in rpm_reg_set_uV_sel() 270 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_mV_enable() local 289 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_uV_enable() local 308 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_switch_enable() local 327 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_mV_disable() local 346 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_uV_disable() local 365 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_switch_disable() local 391 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_set_load() local [all...] |
/kernel/linux/linux-6.6/drivers/regulator/ |
H A D | qcom_rpm-regulator.c | 45 (((reg)->parts->fm.mask >> (reg)->parts->fm.shift) == 3) 53 const struct rpm_reg_parts *parts; member 203 vreg->parts->request_len); in rpm_reg_write() 210 const struct rpm_reg_parts *parts = vreg->parts; in rpm_reg_set_mV_sel() local 211 const struct request_member *req = &parts->mV; in rpm_reg_set_mV_sel() 237 const struct rpm_reg_parts *parts = vreg->parts; in rpm_reg_set_uV_sel() local 238 const struct request_member *req = &parts in rpm_reg_set_uV_sel() 270 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_mV_enable() local 289 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_uV_enable() local 308 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_switch_enable() local 327 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_mV_disable() local 346 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_uV_disable() local 365 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_switch_disable() local 391 const struct rpm_reg_parts *parts = vreg->parts; rpm_reg_set_load() local [all...] |