1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
3 * Copyright (C) 2019, STMicroelectronics - All Rights Reserved
11 int __weak dfu_write_medium_virt(struct dfu_entity *dfu, u64 offset,
14 debug("%s: off=0x%llx, len=0x%x\n", __func__, offset, (u32)*len);
19 int __weak dfu_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
26 int __weak dfu_read_medium_virt(struct dfu_entity *dfu, u64 offset,
29 debug("%s: off=0x%llx, len=0x%x\n", __func__, offset, (u32)*len);
35 int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr, char **argv, int argc)
37 debug("%s: devstr = %s\n", __func__, devstr);
42 dfu->dev_type = DFU_DEV_VIRT;
43 dfu->layout = DFU_RAW_ADDR;
44 dfu->data.virt.dev_num = dectoul(devstr, NULL);
46 dfu->write_medium = dfu_write_medium_virt;
47 dfu->get_medium_size = dfu_get_medium_size_virt;
48 dfu->read_medium = dfu_read_medium_virt;