Lines Matching refs:bflow
44 int bootmeth_read_bootflow(struct udevice *dev, struct bootflow *bflow) in bootmeth_read_bootflow() argument
51 return ops->read_bootflow(dev, bflow); in bootmeth_read_bootflow()
54 int bootmeth_set_bootflow(struct udevice *dev, struct bootflow *bflow, in bootmeth_set_bootflow() argument
62 return ops->set_bootflow(dev, bflow, buf, size); in bootmeth_set_bootflow()
66 int bootmeth_read_all(struct udevice *dev, struct bootflow *bflow) in bootmeth_read_all() argument
73 return ops->read_all(dev, bflow); in bootmeth_read_all()
77 int bootmeth_boot(struct udevice *dev, struct bootflow *bflow) in bootmeth_boot() argument
84 return ops->boot(dev, bflow); in bootmeth_boot()
87 int bootmeth_read_file(struct udevice *dev, struct bootflow *bflow, in bootmeth_read_file() argument
96 return ops->read_file(dev, bflow, file_path, addr, type, sizep); in bootmeth_read_file()
99 int bootmeth_get_bootflow(struct udevice *dev, struct bootflow *bflow) in bootmeth_get_bootflow() argument
105 bootflow_init(bflow, NULL, dev); in bootmeth_get_bootflow()
107 return ops->read_bootflow(dev, bflow); in bootmeth_get_bootflow()
296 int bootmeth_setup_fs(struct bootflow *bflow, struct blk_desc *desc) in bootmeth_setup_fs() argument
301 ret = fs_set_blk_dev_with_part(desc, bflow->part); in bootmeth_setup_fs()
304 } else if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && bflow->fs_type) { in bootmeth_setup_fs()
305 fs_set_type(bflow->fs_type); in bootmeth_setup_fs()
311 int bootmeth_try_file(struct bootflow *bflow, struct blk_desc *desc, in bootmeth_try_file() argument
321 free(bflow->fname); in bootmeth_try_file()
322 bflow->fname = strdup(path); in bootmeth_try_file()
323 if (!bflow->fname) in bootmeth_try_file()
326 if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && bflow->fs_type) in bootmeth_try_file()
327 fs_set_type(bflow->fs_type); in bootmeth_try_file()
333 ret2 = bootmeth_setup_fs(bflow, desc); in bootmeth_try_file()
340 bflow->size = size; in bootmeth_try_file()
341 bflow->state = BOOTFLOWST_FILE; in bootmeth_try_file()
346 int bootmeth_alloc_file(struct bootflow *bflow, uint size_limit, uint align, in bootmeth_alloc_file() argument
354 size = bflow->size; in bootmeth_alloc_file()
359 ret = fs_read_alloc(bflow->fname, bflow->size, align, &buf); in bootmeth_alloc_file()
363 bflow->state = BOOTFLOWST_READY; in bootmeth_alloc_file()
364 bflow->buf = buf; in bootmeth_alloc_file()
366 if (bflow->blk) in bootmeth_alloc_file()
367 desc = dev_get_uclass_plat(bflow->blk); in bootmeth_alloc_file()
369 if (!bootflow_img_add(bflow, bflow->fname, type, map_to_sysmem(buf), in bootmeth_alloc_file()
376 int bootmeth_alloc_other(struct bootflow *bflow, const char *fname, in bootmeth_alloc_other() argument
385 snprintf(path, sizeof(path), "%s%s", bflow->subdir, fname); in bootmeth_alloc_other()
388 if (bflow->blk) in bootmeth_alloc_other()
389 desc = dev_get_uclass_plat(bflow->blk); in bootmeth_alloc_other()
391 ret = bootmeth_setup_fs(bflow, desc); in bootmeth_alloc_other()
398 ret = bootmeth_setup_fs(bflow, desc); in bootmeth_alloc_other()
406 if (!bootflow_img_add(bflow, bflow->fname, type, map_to_sysmem(buf), in bootmeth_alloc_other()
416 int bootmeth_common_read_file(struct udevice *dev, struct bootflow *bflow, in bootmeth_common_read_file() argument
425 if (bflow->blk) in bootmeth_common_read_file()
426 desc = dev_get_uclass_plat(bflow->blk); in bootmeth_common_read_file()
428 ret = bootmeth_setup_fs(bflow, desc); in bootmeth_common_read_file()
438 ret = bootmeth_setup_fs(bflow, desc); in bootmeth_common_read_file()
447 if (!bootflow_img_add(bflow, bflow->fname, type, addr, size)) in bootmeth_common_read_file()