summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2013-09-17 15:58:21 +0200
committerMarek Vasut <marex@denx.de>2013-09-24 17:51:35 +0200
commitba4e95c9f0e18ddeff55ef1b94be650d7b653d3f (patch)
tree8097f878fba79928a25e821797e86a4d7a7fe846 /drivers
parente473b8b65b5c12a840e71939ed9fa243959ec5f2 (diff)
downloadu-boot-imx-ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f.zip
u-boot-imx-ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f.tar.gz
u-boot-imx-ba4e95c9f0e18ddeff55ef1b94be650d7b653d3f.tar.bz2
usb:g_dnl:ums: Conditional compilation for mass storage function (f_mass_storage)
The mass storage composite function is now compiled in only when CONFIG_USB_GADGET_MASS_STORAGE is defined. Such change provides binary size reduction for boards which use USB download gadget (like am335x_evm) with DFU, but don't use UMS. For example at am335x_evm board reduction is more than 2KiB for text and around 120B for data. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/Makefile1
-rw-r--r--drivers/usb/gadget/g_dnl.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 4d51f59..1590c4a 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -23,6 +23,7 @@ COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
+COBJS-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
endif
ifdef CONFIG_USB_ETHER
COBJS-y += ether.o
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index a3e05a8..19011bf 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -15,11 +15,11 @@
#include <part.h>
#include <g_dnl.h>
+#include <usb_mass_storage.h>
#include "f_dfu.h"
#include "gadget_chips.h"
#include "composite.c"
-#include "f_mass_storage.c"
/*
* One needs to define the following: