
On Wed, Jul 17, 2013 at 4:34 PM, Lukasz Majewski wrote:
_As a side note:_
I'm now developing proof-of-concept idea of executing set of commands sent to u-boot by dfu-util [***].
Rationale for this is the lack of ability to reset u-boot after sending data to u-boot via DFU. dfu-util has -R option, but this seems to reset usb interface, not the target device.
Actually, dfu-util -R sends a DFU_DETACH request before performing the USB reset. The reason for this was long unclear to me, until I looked at the uboot dfu code (inherited from openmoko):
http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/usb/gadget/f_dfu.c;h=d7ae0...
"Proprietary extension: 'detach' from idle mode and get back to runtime mode in case of USB Reset. As much as I dislike this, we just can't use every USB bus reset to switch back to runtime mode, since at least the Linux USB stack likes to send a number of resets in a row :( "
The hack/abuse of sending a DFU_DETACH when in DFU mode is not part of the DFU standard, but dfu-util supports it since openmoko was for long the major target for dfu-util.
If you don't need to switch back from DFU mode to runtime mode, maybe you can use this to reset u-boot?
Regards, Tormod