From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tormod Volden Date: Wed, 17 Jul 2013 19:32:00 +0200 Subject: [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution In-Reply-To: <20130717163440.6dbe1a18@amdc308.digital.local> References: <20130716173521.3dd7ec9e@amdc308.digital.local> <51E6715B.3040807@denx.de> <20130717163440.6dbe1a18@amdc308.digital.local> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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=d7ae0c0c6a9f6a95ca3a702d92636eb25e21253c;hb=HEAD#l314 "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