From: Tom Rini Date: Thu, 4 May 2017 07:17:23 -0400 Subject: [U-Boot] [PATCH v3 3/3] spl: dfu: reduce spl-dfu MLO size In-Reply-To: <1493892930-18194-4-git-send-email-ravibabu@ti.com> References: <1493892930-18194-1-git-send-email-ravibabu@ti.com> <1493892930-18194-4-git-send-email-ravibabu@ti.com> Message-ID: <20170504111723.GZ12511@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, May 04, 2017 at 03:45:30PM +0530, Ravi Babu wrote: > compile out cli_hush.c for spl/dfu and > use cli_simple_run_command for dfu to > reduce the spl-dfu memory foot print. > > Adding CONFIG_SPL_DFU_MMC to Kconfig and > use CONFIG_IS_ENABLED(DFU_MMC). > > Signed-off-by: Ravi Babu [snip] > diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile > index 61f2b71..7060908 100644 > --- a/drivers/dfu/Makefile > +++ b/drivers/dfu/Makefile > @@ -6,7 +6,10 @@ > # > > obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o > +ifndef CONFIG_SPL_BUILD > obj-$(CONFIG_DFU_MMC) += dfu_mmc.o > +endif > +obj-$(CONFIG_SPL_DFU_MMC) += dfu_mmc.o This becomes obj-$(CONFIG_$(SPL_)DFU_MMC) += dfu_mmc.o > diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c > index 926ccbd..ba509db 100644 > --- a/drivers/dfu/dfu_mmc.c > +++ b/drivers/dfu/dfu_mmc.c [snip] > @@ -154,7 +155,11 @@ static int mmc_file_op(enum dfu_op op, struct dfu_entity *dfu, > > debug("%s: %s 0x%p\n", __func__, cmd_buf, cmd_buf); > > +#if CONFIG_IS_ENABLED(DFU_MMC) > + ret = cli_simple_run_command(cmd_buf, 0); > +#else > ret = run_command(cmd_buf, 0); > +#endif This doesn't make sense. CONFIG_IS_ENABLED(DFU_MMC) is true for CONFIG_DFU_MMC or CONFIG_SPL_DFU_MMC. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: