From: Tom Rini Date: Thu, 27 Apr 2017 14:13:13 -0400 Subject: [U-Boot] [PATCH v2 2/3] common: dfu: ignore reset for spl-dfu In-Reply-To: <6C6B28D4DC342643927BEAFCE8707BF6C0B6E7E1@DBDE04.ent.ti.com> References: <1493295321-15498-1-git-send-email-ravibabu@ti.com> <1493295321-15498-3-git-send-email-ravibabu@ti.com> <20170427123256.GQ12511@bill-the-cat> <6C6B28D4DC342643927BEAFCE8707BF6C0B6E7E1@DBDE04.ent.ti.com> Message-ID: <20170427181313.GW12511@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Apr 27, 2017 at 05:24:09PM +0000, B, Ravi wrote: > Hi Tom > > >> > >> diff --git a/common/dfu.c b/common/dfu.c index 0e9f5f5..546a1ab 100644 > >> --- a/common/dfu.c > >> +++ b/common/dfu.c > >> @@ -88,7 +88,7 @@ exit: > >> board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE); > >> > >> if (dfu_reset) > >> - run_command("reset", 0); > >> + do_reset(NULL, 0, 0, NULL); > >> > >> g_dnl_clear_detach(); > > >So this hunk drops out the need for cli stuff. > > Yes. > > >> diff --git a/common/spl/Kconfig b/common/spl/Kconfig index > >> 1231351..f51ae2c 100644 > >> --- a/common/spl/Kconfig > >> +++ b/common/spl/Kconfig > >> @@ -6,6 +6,9 @@ config SUPPORT_SPL > >> config SUPPORT_TPL > >> bool > >> > >> +config SPL_DFU_NO_RESET > >> + bool > >> + > >> config SPL > >> bool > >> depends on SUPPORT_SPL > >> @@ -646,6 +649,7 @@ config SPL_USBETH_SUPPORT config SPL_DFU_SUPPORT > >> bool "Support DFU (Device Firmware Upgarde)" > >> select SPL_HASH_SUPPORT > >> + select SPL_DFU_NO_RESET > >> depends on SPL_RAM_SUPPORT > >> help > >> This feature enables the DFU (Device Firmware Upgarde) in SPL with > >> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index > >> 8dacc1a..ceb33e3 100644 > >> --- a/drivers/dfu/dfu.c > >> +++ b/drivers/dfu/dfu.c > >> @@ -35,7 +35,11 @@ static struct hash_algo *dfu_hash_algo; > >> */ > >> __weak bool dfu_usb_get_reset(void) > > { > >> +#ifdef CONFIG_SPL_DFU_NO_RESET > >> + return false; > >> +#else > >> return true; > >> +#endif > >> } > >> > >> static int dfu_find_alt_num(const char *s) > > >So do we still need the above, in order to save space? How much are we saving here even, now? Thanks! > > I observed around 7K reduced. I don't just mean dropping out CLI, I mean after dropping out CLI but leaving in the reset logic. That's _still_ 7k? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: