mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
![]() DFU read support appears to rely upon dfu->read_medium() updating the passed-by-reference len parameter to indicate the remaining size available for reading. dfu_read_medium_mmc() never does this, and the implementation of dfu_read_medium_nand() will only work if called just once; it hard-codes the value to the total size of the NAND device irrespective of read offset. I believe that overloading dfu->read_medium() is confusing. As such, this patch introduces a new function dfu->get_medium_size() which can be used to explicitly find out the medium size, and nothing else. dfu_read() is modified to use this function to set the initial value for dfu->r_left, rather than attempting to use the side-effects of dfu->read_medium() for this purpose. Due to this change, dfu_read() must initially set dfu->b_left to 0, since no data has been read. dfu_read_buffer_fill() must also be modified not to adjust dfu->r_left when simply copying data from dfu->i_buf_start to the upload request buffer. r_left represents the amount of data left to be read from HW. That value is not affected by the memcpy(), but only by calls to dfu->read_medium(). After this change, I can read from either a 4MB or 1.5MB chunk of a 4MB eMMC boot partion with CONFIG_SYS_DFU_DATA_BUF_SIZE==1MB. Without this change, attempting to do that would result in DFU read returning no data at all due to r_left never being set. Signed-off-by: Stephen Warren <swarren@nvidia.com> |
||
---|---|---|
.. | ||
andestech | ||
asm-generic | ||
bedbug | ||
configs | ||
cramfs | ||
dm | ||
dt-bindings | ||
faraday | ||
galileo | ||
jffs2 | ||
linux | ||
lzma | ||
mtd | ||
pcmcia | ||
power | ||
samsung | ||
synopsys | ||
u-boot | ||
usb | ||
zfs | ||
.gitignore | ||
74xx_7xx.h | ||
_exports.h | ||
ACEX1K.h | ||
addr_map.h | ||
aes.h | ||
ahci.h | ||
ali512x.h | ||
altera.h | ||
ambapp.h | ||
android_image.h | ||
ansi.h | ||
api_public.h | ||
armcoremodule.h | ||
asm-offsets.h | ||
ata.h | ||
atmel_hlcdc.h | ||
atmel_lcdc.h | ||
atmel_mci.h | ||
autoboot.h | ||
axp152.h | ||
axp209.h | ||
bcd.h | ||
bitfield.h | ||
bmp_layout.h | ||
bootcount.h | ||
bootm.h | ||
bootretry.h | ||
bootstage.h | ||
bouncebuf.h | ||
bus_vcxk.h | ||
bzlib.h | ||
cbfs.h | ||
circbuf.h | ||
cli.h | ||
cli_hush.h | ||
clk.h | ||
cmd_spl.h | ||
command.h | ||
common.h | ||
common_timing_params.h | ||
commproc.h | ||
compiler.h | ||
config_cmd_all.h | ||
config_cmd_default.h | ||
config_cmd_defaults.h | ||
config_defaults.h | ||
config_distro_defaults.h | ||
config_fallbacks.h | ||
config_phylib_all_drivers.h | ||
config_uncmd_spl.h | ||
cpsw.h | ||
crc.h | ||
cros_ec.h | ||
cros_ec_message.h | ||
dataflash.h | ||
ddr_spd.h | ||
dfu.h | ||
dialog_pmic.h | ||
div64.h | ||
dm-demo.h | ||
dm.h | ||
dm9000.h | ||
dp83848.h | ||
ds1722.h | ||
ds4510.h | ||
dtt.h | ||
dwmmc.h | ||
e500.h | ||
ec_commands.h | ||
edid.h | ||
elf.h | ||
env_attr.h | ||
env_callback.h | ||
env_default.h | ||
env_flags.h | ||
environment.h | ||
errno.h | ||
exports.h | ||
ext4fs.h | ||
ext_common.h | ||
fat.h | ||
fdt.h | ||
fdt_support.h | ||
fdtdec.h | ||
fis.h | ||
flash.h | ||
fm_eth.h | ||
fpga.h | ||
fs.h | ||
fsl_ddr.h | ||
fsl_ddr_dimm_params.h | ||
fsl_ddr_sdram.h | ||
fsl_ddrc_version.h | ||
fsl_diu_fb.h | ||
fsl_esdhc.h | ||
fsl_ifc.h | ||
fsl_immap.h | ||
fsl_mc.h | ||
fsl_mdio.h | ||
fsl_pmic.h | ||
fsl_usb.h | ||
fuse.h | ||
g_dnl.h | ||
gdsys_fpga.h | ||
gt64120.h | ||
hash.h | ||
hw_sha.h | ||
hwconfig.h | ||
i2c.h | ||
i2s.h | ||
i8042.h | ||
ide.h | ||
image.h | ||
initcall.h | ||
input.h | ||
iomux.h | ||
ioports.h | ||
iotrace.h | ||
ipu_pixfmt.h | ||
key_matrix.h | ||
keyboard.h | ||
kgdb.h | ||
lattice.h | ||
lcd.h | ||
lcdvideo.h | ||
ld9040.h | ||
led-display.h | ||
libata.h | ||
libfdt.h | ||
libfdt_env.h | ||
libtizen.h | ||
linker_lists.h | ||
linux_logo.h | ||
lmb.h | ||
logbuff.h | ||
lxt971a.h | ||
lynxkdi.h | ||
malloc.h | ||
mb862xx.h | ||
mc9sdz60.h | ||
mc13783.h | ||
mc13892.h | ||
mc34704.h | ||
MCD_dma.h | ||
MCD_progCheck.h | ||
MCD_tasksInit.h | ||
menu.h | ||
micrel.h | ||
mii_phy.h | ||
miiphy.h | ||
mk48t59.h | ||
mmc.h | ||
mpc5xx.h | ||
mpc5xxx.h | ||
mpc5xxx_sdma.h | ||
mpc8xx.h | ||
mpc8xx_irq.h | ||
mpc83xx.h | ||
mpc85xx.h | ||
mpc86xx.h | ||
mpc106.h | ||
mpc824x.h | ||
mpc8260.h | ||
mpc8260_irq.h | ||
msc01.h | ||
mtd_node.h | ||
mv88e6352.h | ||
mvebu_mmc.h | ||
mvmfp.h | ||
nand.h | ||
net.h | ||
netdev.h | ||
nios2-epcs.h | ||
nios2-io.h | ||
nios2-yanu.h | ||
nios2.h | ||
nomadik.h | ||
ns16550.h | ||
ns87308.h | ||
onenand_uboot.h | ||
os.h | ||
palmas.h | ||
part.h | ||
part_efi.h | ||
pc_keyb.h | ||
pca953x.h | ||
pca9564.h | ||
pca9698.h | ||
pci.h | ||
pci_gt64120.h | ||
pci_ids.h | ||
pci_msc01.h | ||
pcmcia.h | ||
phy.h | ||
physmem.h | ||
post.h | ||
ppc_asm.tmpl | ||
ppc_defs.h | ||
ps2mult.h | ||
pwm.h | ||
radeon.h | ||
reiserfs.h | ||
rtc.h | ||
s6e63d6.h | ||
s_record.h | ||
SA-1100.h | ||
sandboxblockdev.h | ||
sandboxfs.h | ||
sata.h | ||
scf0403_lcd.h | ||
scsi.h | ||
sdhci.h | ||
search.h | ||
sed156x.h | ||
sed13806.h | ||
serial.h | ||
sh_pfc.h | ||
sh_tmu.h | ||
sja1000.h | ||
slre.h | ||
sm501.h | ||
sound.h | ||
spartan2.h | ||
spartan3.h | ||
spd.h | ||
spd_sdram.h | ||
spi.h | ||
spi_flash.h | ||
spl.h | ||
splash.h | ||
status_led.h | ||
stdio_dev.h | ||
stratixII.h | ||
sx151x.h | ||
sym53c8xx.h | ||
systemace.h | ||
tca642x.h | ||
tegra-kbc.h | ||
thor.h | ||
timestamp.h | ||
tis.h | ||
tmu.h | ||
tpm.h | ||
tps6586x.h | ||
trace.h | ||
tsec.h | ||
tsi108.h | ||
tsi148.h | ||
twl4030.h | ||
twl6030.h | ||
tws.h | ||
ubi_uboot.h | ||
universe.h | ||
usb.h | ||
usb_cdc_acm.h | ||
usb_defs.h | ||
usb_ether.h | ||
usb_mass_storage.h | ||
usbdescriptors.h | ||
usbdevice.h | ||
usbroothubdes.h | ||
uuid.h | ||
version.h | ||
video.h | ||
video_ad7176.h | ||
video_ad7177.h | ||
video_ad7179.h | ||
video_easylogo.h | ||
video_fb.h | ||
video_font.h | ||
video_font_4x6.h | ||
video_font_data.h | ||
video_logo.h | ||
virtex2.h | ||
vsc7385.h | ||
vsprintf.h | ||
vxworks.h | ||
w83c553f.h | ||
watchdog.h | ||
xilinx.h | ||
xyzModem.h | ||
zfs_common.h | ||
zynqpl.h |