Lines Matching refs:bflow
43 int bootmeth_read_bootflow(struct udevice *dev, struct bootflow *bflow) in bootmeth_read_bootflow() argument
50 return ops->read_bootflow(dev, bflow); in bootmeth_read_bootflow()
53 int bootmeth_set_bootflow(struct udevice *dev, struct bootflow *bflow, in bootmeth_set_bootflow() argument
61 return ops->set_bootflow(dev, bflow, buf, size); in bootmeth_set_bootflow()
64 int bootmeth_boot(struct udevice *dev, struct bootflow *bflow) in bootmeth_boot() argument
71 return ops->boot(dev, bflow); in bootmeth_boot()
74 int bootmeth_read_file(struct udevice *dev, struct bootflow *bflow, in bootmeth_read_file() argument
82 return ops->read_file(dev, bflow, file_path, addr, sizep); in bootmeth_read_file()
85 int bootmeth_get_bootflow(struct udevice *dev, struct bootflow *bflow) in bootmeth_get_bootflow() argument
91 bootflow_init(bflow, NULL, dev); in bootmeth_get_bootflow()
93 return ops->read_bootflow(dev, bflow); in bootmeth_get_bootflow()
254 static int setup_fs(struct bootflow *bflow, struct blk_desc *desc) in setup_fs() argument
259 ret = fs_set_blk_dev_with_part(desc, bflow->part); in setup_fs()
262 } else if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && bflow->fs_type) { in setup_fs()
263 fs_set_type(bflow->fs_type); in setup_fs()
269 int bootmeth_try_file(struct bootflow *bflow, struct blk_desc *desc, in bootmeth_try_file() argument
279 free(bflow->fname); in bootmeth_try_file()
280 bflow->fname = strdup(path); in bootmeth_try_file()
281 if (!bflow->fname) in bootmeth_try_file()
284 if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && bflow->fs_type) in bootmeth_try_file()
285 fs_set_type(bflow->fs_type); in bootmeth_try_file()
291 ret2 = setup_fs(bflow, desc); in bootmeth_try_file()
298 bflow->size = size; in bootmeth_try_file()
299 bflow->state = BOOTFLOWST_FILE; in bootmeth_try_file()
330 int bootmeth_alloc_file(struct bootflow *bflow, uint size_limit, uint align) in bootmeth_alloc_file() argument
336 size = bflow->size; in bootmeth_alloc_file()
341 ret = alloc_file(bflow->fname, bflow->size, &buf); in bootmeth_alloc_file()
345 bflow->state = BOOTFLOWST_READY; in bootmeth_alloc_file()
346 bflow->buf = buf; in bootmeth_alloc_file()
351 int bootmeth_alloc_other(struct bootflow *bflow, const char *fname, in bootmeth_alloc_other() argument
360 snprintf(path, sizeof(path), "%s%s", bflow->subdir, fname); in bootmeth_alloc_other()
363 if (bflow->blk) in bootmeth_alloc_other()
364 desc = dev_get_uclass_plat(bflow->blk); in bootmeth_alloc_other()
366 ret = setup_fs(bflow, desc); in bootmeth_alloc_other()
373 ret = setup_fs(bflow, desc); in bootmeth_alloc_other()
387 int bootmeth_common_read_file(struct udevice *dev, struct bootflow *bflow, in bootmeth_common_read_file() argument
395 if (bflow->blk) in bootmeth_common_read_file()
396 desc = dev_get_uclass_plat(bflow->blk); in bootmeth_common_read_file()
398 ret = setup_fs(bflow, desc); in bootmeth_common_read_file()
408 ret = setup_fs(bflow, desc); in bootmeth_common_read_file()