Home
last modified time | relevance | path

Searched refs:dfu (Results 1 – 25 of 35) sorted by relevance

12

/openbmc/u-boot/drivers/dfu/
H A Ddfu.c98 unsigned char *dfu_get_buf(struct dfu_entity *dfu) in dfu_get_buf() argument
112 if (dfu->max_buf_size && dfu_buf_size > dfu->max_buf_size) in dfu_get_buf()
113 dfu_buf_size = dfu->max_buf_size; in dfu_get_buf()
140 static int dfu_write_buffer_drain(struct dfu_entity *dfu) in dfu_write_buffer_drain() argument
146 w_size = dfu->i_buf - dfu->i_buf_start; in dfu_write_buffer_drain()
151 dfu_hash_algo->hash_update(dfu_hash_algo, &dfu->crc, in dfu_write_buffer_drain()
152 dfu->i_buf_start, w_size, 0); in dfu_write_buffer_drain()
154 ret = dfu->write_medium(dfu, dfu->offset, dfu->i_buf_start, &w_size); in dfu_write_buffer_drain()
159 dfu->i_buf = dfu->i_buf_start; in dfu_write_buffer_drain()
162 dfu->offset += w_size; in dfu_write_buffer_drain()
[all …]
H A Ddfu_mmc.c22 static int mmc_block_op(enum dfu_op op, struct dfu_entity *dfu, in mmc_block_op() argument
29 mmc = find_mmc_device(dfu->data.mmc.dev_num); in mmc_block_op()
31 pr_err("Device MMC %d - not found!", dfu->data.mmc.dev_num); in mmc_block_op()
39 *len = ALIGN(*len, dfu->data.mmc.lba_blk_size); in mmc_block_op()
41 blk_start = dfu->data.mmc.lba_start + in mmc_block_op()
42 (u32)lldiv(offset, dfu->data.mmc.lba_blk_size); in mmc_block_op()
43 blk_count = *len / dfu->data.mmc.lba_blk_size; in mmc_block_op()
45 dfu->data.mmc.lba_start + dfu->data.mmc.lba_size) { in mmc_block_op()
50 if (dfu->data.mmc.hw_partition >= 0) { in mmc_block_op()
53 dfu->data.mmc.dev_num, in mmc_block_op()
[all …]
H A Ddfu_nand.c21 static int nand_block_op(enum dfu_op op, struct dfu_entity *dfu, in nand_block_op() argument
31 *len = dfu->data.nand.size; in nand_block_op()
35 start = dfu->data.nand.start + offset + dfu->bad_skip; in nand_block_op()
36 lim = dfu->data.nand.start + dfu->data.nand.size - start; in nand_block_op()
82 dfu->bad_skip += actual - count; in nand_block_op()
87 static inline int nand_block_write(struct dfu_entity *dfu, in nand_block_write() argument
90 return nand_block_op(DFU_OP_WRITE, dfu, offset, buf, len); in nand_block_write()
93 static inline int nand_block_read(struct dfu_entity *dfu, in nand_block_read() argument
96 return nand_block_op(DFU_OP_READ, dfu, offset, buf, len); in nand_block_read()
99 static int dfu_write_medium_nand(struct dfu_entity *dfu, in dfu_write_medium_nand() argument
[all …]
H A Ddfu_sf.c14 static int dfu_get_medium_size_sf(struct dfu_entity *dfu, u64 *size) in dfu_get_medium_size_sf() argument
16 *size = dfu->data.sf.size; in dfu_get_medium_size_sf()
21 static int dfu_read_medium_sf(struct dfu_entity *dfu, u64 offset, void *buf, in dfu_read_medium_sf() argument
24 return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start + offset, in dfu_read_medium_sf()
28 static u64 find_sector(struct dfu_entity *dfu, u64 start, u64 offset) in find_sector() argument
30 return (lldiv((start + offset), dfu->data.sf.dev->sector_size)) * in find_sector()
31 dfu->data.sf.dev->sector_size; in find_sector()
34 static int dfu_write_medium_sf(struct dfu_entity *dfu, in dfu_write_medium_sf() argument
39 ret = spi_flash_erase(dfu->data.sf.dev, in dfu_write_medium_sf()
40 find_sector(dfu, dfu->data.sf.start, offset), in dfu_write_medium_sf()
[all …]
H A Ddfu_ram.c16 static int dfu_transfer_medium_ram(enum dfu_op op, struct dfu_entity *dfu, in dfu_transfer_medium_ram() argument
19 if (dfu->layout != DFU_RAM_ADDR) { in dfu_transfer_medium_ram()
20 pr_err("unsupported layout: %s\n", dfu_get_layout(dfu->layout)); in dfu_transfer_medium_ram()
24 if (offset > dfu->data.ram.size) { in dfu_transfer_medium_ram()
30 memcpy(dfu->data.ram.start + offset, buf, *len); in dfu_transfer_medium_ram()
32 memcpy(buf, dfu->data.ram.start + offset, *len); in dfu_transfer_medium_ram()
37 static int dfu_write_medium_ram(struct dfu_entity *dfu, u64 offset, in dfu_write_medium_ram() argument
40 return dfu_transfer_medium_ram(DFU_OP_WRITE, dfu, offset, buf, len); in dfu_write_medium_ram()
43 int dfu_get_medium_size_ram(struct dfu_entity *dfu, u64 *size) in dfu_get_medium_size_ram() argument
45 *size = dfu->data.ram.size; in dfu_get_medium_size_ram()
[all …]
H A Ddfu_tftp.c17 struct dfu_entity *dfu; in dfu_tftp_write() local
51 dfu = dfu_get_entity(alt_setting_num); in dfu_tftp_write()
52 if (!dfu) { in dfu_tftp_write()
58 ret = dfu_write_from_mem_addr(dfu, (void *)(uintptr_t)addr, len); in dfu_tftp_write()
H A DMakefile6 obj-$(CONFIG_$(SPL_)DFU) += dfu.o
/openbmc/u-boot/include/
H A Ddfu.h111 int (*get_medium_size)(struct dfu_entity *dfu, u64 *size);
113 int (*read_medium)(struct dfu_entity *dfu,
116 int (*write_medium)(struct dfu_entity *dfu,
119 int (*flush_medium)(struct dfu_entity *dfu);
120 unsigned int (*poll_timeout)(struct dfu_entity *dfu);
122 void (*free_entity)(struct dfu_entity *dfu);
155 unsigned char *dfu_get_buf(struct dfu_entity *dfu);
184 static inline void dfu_set_defer_flush(struct dfu_entity *dfu) in dfu_set_defer_flush() argument
186 dfu_defer_flush = dfu; in dfu_set_defer_flush()
201 int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size);
[all …]
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-support/dfu-util/
H A Ddfu-util-native_0.11.bb1 require dfu-util_${PV}.bb
12 install -m 0755 src/dfu-util ${DEPLOYDIR}/dfu-util-${PV}
13 rm -f ${DEPLOYDIR}/dfu-util
14 ln -sf ./dfu-util-${PV} ${DEPLOYDIR}/dfu-util
H A Ddfu-util_0.11.bb2 HOMEPAGE = "http://dfu-util.sourceforge.net"
8 SRC_URI = "http://dfu-util.sourceforge.net/releases/${BP}.tar.gz"
/openbmc/u-boot/board/warp/
H A DREADME8 - dfu-util: http://dfu-util.sourceforge.net/releases/
40 => dfu 0 mmc 0
44 $ sudo dfu-util -D u-boot.imx -a boot
/openbmc/u-boot/doc/
H A DREADME.dfutftp42 The "dfu" command has been extended to support transfer via TFTP - one
43 needs to type for example "dfu tftp 0 mmc 0"
55 The "dfu tftp" command can be used in the "preboot" environment variable
84 3. If required, to update firmware on boot, put the "dfu tftp 0 mmc 0" in the
87 4. Inspect "dfu" specific variables:
119 * Extend dfu-util command to support TFTP based transfers
H A Dgit-mailrc107 alias dfu uboot, lukma
/openbmc/u-boot/board/warp7/
H A DREADME8 - dfu-util: http://dfu-util.sourceforge.net/releases/ (if you are in a
47 => dfu 0 mmc 0
51 $ sudo dfu-util -D u-boot-dtb.imx -a boot
/openbmc/u-boot/board/technexion/pico-imx7d/
H A DREADME54 Run the DFU agent so we can flash the new images using dfu-util tool:
56 => dfu 0 mmc 0
60 $ sudo dfu-util -D SPL -a spl
62 $ sudo dfu-util -D u-boot.img -a u-boot
/openbmc/u-boot/board/bticino/mamoj/
H A DREADME80 => dfu 0 mmc 2
84 # dfu-util -D SPL -a spl
89 => dfu 0 mmc 2
93 # dfu-util -D u-boot-dtb.img -a u-boot
/openbmc/u-boot/board/technexion/pico-imx6ul/
H A DREADME8 - dfu-util: http://dfu-util.sourceforge.net/releases/
53 Run the DFU agent so we can flash the new images using dfu-util tool:
55 => dfu 0 mmc 0
59 $ sudo dfu-util -D SPL -a spl
61 $ sudo dfu-util -D u-boot-dtb.img -a u-boot
/openbmc/u-boot/drivers/usb/gadget/
H A Df_dfu.c174 static inline int dfu_get_manifest_timeout(struct dfu_entity *dfu) in dfu_get_manifest_timeout() argument
176 return dfu->poll_timeout ? dfu->poll_timeout(dfu) : in dfu_get_manifest_timeout()
184 struct dfu_entity *dfu = dfu_get_entity(f_dfu->altsetting); in handle_getstatus() local
197 dfu_set_poll_timeout(dstat, dfu_get_manifest_timeout(dfu)); in handle_getstatus()
/openbmc/u-boot/drivers/
H A DMakefile5 obj-$(CONFIG_$(SPL_TPL_)DFU) += dfu/
89 obj-y += dfu/
H A DKconfig31 source "drivers/dfu/Kconfig"
/openbmc/u-boot/cmd/
H A Ddfu.c64 U_BOOT_CMD(dfu, CONFIG_SYS_MAXARGS, 1, do_dfu,
H A DMakefile165 obj-$(CONFIG_CMD_DFU) += dfu.o
/openbmc/u-boot/common/
H A DMakefile68 obj-$(CONFIG_DFU_OVER_USB) += dfu.o
127 obj-$(CONFIG_DFU_OVER_USB) += dfu.o
/openbmc/openbmc/poky/meta/conf/distro/include/
H A Dno-static-libs.inc19 # libusb1-native is used to build static dfu-util-native
/openbmc/u-boot/
H A DMAINTAINERS441 T: git git://git.denx.de/u-boot-dfu.git
442 F: cmd/dfu.c
444 F: common/dfu.c
447 F: drivers/dfu/

12