u-boot/drivers/dfu
Stephen Warren 873cc1d777 mmc: store hwpart in the block device
This will allow us to have multiple block device structs each referring
to the same eMMC device, yet different HW partitions.

For now, there is still a single block device per eMMC device. As before,
this block device always accesses whichever HW partition was most recently
selected. Clients wishing to make use of multiple block devices referring
to different HW partitions can simply take a copy of this block device
once it points at the correct HW partition, and use each one as they wish.
This feature will be used by the next patch.

In the future, perhaps get_device() could be enhanced to return a
dynamically allocated block device struct, to avoid the client needing to
copy it in order to maintain multiple block devices. However, this would
require all users to be updated to free those block device structs at some
point, which is rather a large change.

Most callers of mmc_switch_part() wish to permanently switch the default
MMC block device's HW partition. Enhance mmc_switch_part() so that it does
this. This removes the need for callers to do this. However,
common/env_mmc.c needs to save and restore the current HW partition. Make
it do this more explicitly.

Replace use of mmc_switch_part() with mmc_select_hwpart() in order to
remove duplicate code that skips the call if that HW partition is already
selected.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-01-13 21:05:19 -05:00
..
dfu_mmc.c mmc: store hwpart in the block device 2016-01-13 21:05:19 -05:00
dfu_nand.c dfu: nand: Verify writes 2015-03-30 23:24:38 -05:00
dfu_ram.c dfu: defer parsing of device string to IO backend 2014-08-09 11:16:58 -04:00
dfu_sf.c dfu: dfu_sf: Pass duplicate devstr to parse_dev 2015-11-03 17:29:33 +01:00
dfu_tftp.c dfu: tftp: update: Provide tftp support for the DFU subsystem 2015-09-07 13:41:04 +02:00
dfu.c dfu: mmc: buffer file reads too 2015-09-11 17:15:23 -04:00
Kconfig dfu: tftp: Kconfig: Add Kconfig entry for dfu tftp feature 2015-09-07 13:41:05 +02:00
Makefile dfu: tftp: update: Provide tftp support for the DFU subsystem 2015-09-07 13:41:04 +02:00