struct spl_load_info load;
debug("Found FIT image\n");
- load.filename = NULL;
load.bl_len = 1;
load.read = spi_load_read;
ret = spl_load_simple_fit(spl_image, &load,
struct blk_dev {
const char *ifname;
+ const char *filename;
char dev_part_str[8];
};
return ret;
}
- ret = fs_read(load->filename, virt_to_phys(buf), file_offset, size,
+ ret = fs_read(dev->filename, virt_to_phys(buf), file_offset, size,
&actlen);
if (ret < 0) {
printf("spl: error reading image %s. Err - %d\n",
- load->filename, ret);
+ dev->filename, ret);
return ret;
}
debug("Found FIT\n");
load.read = spl_fit_read;
load.bl_len = ARCH_DMA_MINALIGN;
- load.filename = (void *)filename;
load.priv = &dev;
+ dev.filename = filename;
return spl_load_simple_fit(spl_image, &load, 0, header);
}
{
loff_t actread;
int ret;
- char *filename = (char *)load->filename;
+ char *filename = load->priv;
ret = fat_read_file(filename, buf, file_offset, size, &actread);
if (ret)
debug("Found FIT\n");
load.read = spl_fit_read;
load.bl_len = ARCH_DMA_MINALIGN;
- load.filename = (void *)filename;
+ load.priv = (void *)filename;
return spl_load_simple_fit(spl_image, &load, 0, header);
} else {
debug("Found FIT\n");
load.priv = bd;
- load.filename = NULL;
load.bl_len = bd->blksz;
load.read = h_spl_load_read;
ret = spl_load_simple_fit(spl_image, &load,
struct spl_load_info load;
load.priv = bd;
- load.filename = NULL;
load.bl_len = bd->blksz;
load.read = h_spl_load_read;
debug("Found FIT\n");
load.priv = &offset;
- load.filename = NULL;
load.bl_len = bl_len;
load.read = spl_nand_fit_read;
return spl_load_simple_fit(spl_image, &load, offset, header);
struct spl_load_info load;
load.priv = &offset;
- load.filename = NULL;
load.bl_len = bl_len;
load.read = spl_nand_fit_read;
return spl_load_imx_container(spl_image, &load, offset);
struct spl_load_info load;
debug("Found legacy image\n");
- load.filename = NULL;
load.bl_len = IS_ENABLED(CONFIG_SPL_LZMA) ? bl_len : 1;
load.read = spl_nand_legacy_read;
debug("Found FIT\n");
load.read = smh_fit_read;
load.bl_len = 1;
- load.filename = NULL;
load.priv = &fd;
ret = spl_load_simple_fit(spl_image, &load, 0, header);
debug("Found FIT\n");
load.priv = flash;
- load.filename = NULL;
load.bl_len = 1;
load.read = spl_spi_fit_read;
err = spl_load_simple_fit(spl_image, &load,
struct spl_load_info load;
load.priv = flash;
- load.filename = NULL;
load.bl_len = 1;
load.read = spl_spi_fit_read;
debug("Found FIT\n");
load.priv = (void *)&info;
- load.filename = NULL;
load.bl_len = 1;
info.buf = buf;
info.image_read = BUF_SIZE;
*
* @priv: Private data for the device
* @bl_len: Block length for reading in bytes
- * @filename: Name of the fit image file.
* @read: Function to call to read from the device
*/
struct spl_load_info {
void *priv;
- const char *filename;
/**
* read() - Read from device
*
ret = sandbox_find_next_phase(fname, sizeof(fname), true);
if (ret)
ut_assertf(0, "%s not found, error %d\n", fname, ret);
- load.filename = fname;
header = spl_get_load_buffer(-sizeof(*header), sizeof(*header));