All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu
Date: Wed, 26 Apr 2017 12:24:06 -0400	[thread overview]
Message-ID: <20170426162406.GA12511@bill-the-cat> (raw)
In-Reply-To: <6C6B28D4DC342643927BEAFCE8707BF6C0B6CF01@DBDE04.ent.ti.com>

On Wed, Apr 26, 2017 at 03:58:27PM +0000, B, Ravi wrote:
> Hi Tom
> 
> >> The SPL-DFU feature enable to load and execute u-boot over usb from PC 
> >> using dfu-util.
> >> Hence dfu-reset should not be issued
> >> when dfu-util -R switch is issued.
> >> 
> >> Signed-off-by: Ravi Babu <ravibabu@ti.com>
> >> ---
> >>  common/dfu.c | 3 +++
> >>  1 file changed, 3 insertions(+)
> >> 
> >> diff --git a/common/dfu.c b/common/dfu.c index 0e9f5f5..fa77526 100644
> >> --- a/common/dfu.c
> >> +++ b/common/dfu.c
> >> @@ -87,6 +87,9 @@ exit:
> >>  	g_dnl_unregister();
> >>  	board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE);
> >>  
> >> +#ifdef CONFIG_SPL_BUILD
> >> +	dfu_reset = 0;
> >> +#endif
> >>  	if (dfu_reset)
> >>  		run_command("reset", 0);
> 
> >So we "fix" some of the problems we see by saying that you can't
> >reset the board in SPL via DFU.  I think maybe we should instead drop
> >run_command here and make reset-via-DFU call do_reset() directly like
> >some other small-size-required cases do.  This will let us drop the
> >command >requirement here but still allow for "use DFU to flash and
> >reset the board with just SPL" as a use-case.  Thanks!
> 
> The SPL-DFU will load and execute u-boot.img from RAM.  If we issue
> dfu-reset (-R switch), this leads to cpu-reset and we lost the purpose
> of SPL-DFU itself.  Hence dfu-reset issue shall not be issued for
> SPL-DFU. 
> 
> I agree, the dfu-reset is needed in u-boot, after flashing images to
> QSPI/eMMC/SD using the DFU to execute newly loaded image.  So,
> dfu-reset is needed for u-boot, but not required for SPL-DFU.
> 
> For u-boot, we can continue to use run_command() for dfu-reset.

OK.  I guess if someone else wants to try and use SPL for DFU flashing
that requires more work and they can address the above then, thanks!

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170426/f8088a03/attachment.sig>

  reply	other threads:[~2017-04-26 16:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 13:14 [U-Boot] [PATCH 0/3] spl: dfu: misc fixes and reduce MLO foot print Ravi Babu
2017-04-26 13:14 ` [U-Boot] [PATCH 1/3] spl: Kconfig: dfu: spl-dfu depends on SPL_RAM_SUPPORT Ravi Babu
2017-04-26 13:36   ` Tom Rini
2017-04-26 13:14 ` [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu Ravi Babu
2017-04-26 13:40   ` Tom Rini
2017-04-26 15:58     ` B, Ravi
2017-04-26 16:24       ` Tom Rini [this message]
2017-04-26 16:25         ` B, Ravi
2017-04-27  8:06         ` Lukasz Majewski
2017-04-27  8:37           ` B, Ravi
2017-04-27  8:37           ` B, Ravi
2017-04-26 13:14 ` [U-Boot] [PATCH 3/3] spl: dfu: reduce spl-dfu MLO size Ravi Babu
2017-04-26 13:35   ` Tom Rini
2017-04-27  7:22     ` B, Ravi
2017-04-27 12:31       ` Tom Rini
2017-04-27 17:25         ` B, Ravi
2017-05-03  8:36         ` B, Ravi
2017-05-03 12:42           ` Tom Rini
2017-05-03 12:45             ` B, Ravi
2017-05-03 20:53               ` Lukasz Majewski
2017-05-03 20:48             ` Lukasz Majewski
     [not found] <1493212325-31879-1-git-send-email-ravibabu@ti.com>
     [not found] ` <1493212325-31879-3-git-send-email-ravibabu@ti.com>
     [not found]   ` <20170427095527.2a3992fe@jawa>
2017-04-27  8:26     ` [U-Boot] [PATCH 2/3] common: dfu: ignore reset for spl-dfu B, Ravi
2017-04-27 10:33       ` Lukasz Majewski
2017-04-27 10:34         ` Lukasz Majewski
2017-04-27 11:19           ` B, Ravi
2017-04-27 13:09             ` Lukasz Majewski
2017-04-27 17:30               ` B, Ravi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170426162406.GA12511@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.