All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pantelis Antoniou <panto@antoniou-consulting.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/9] usb: Fix bug when both DFU & ETHER are defined
Date: Fri, 30 Nov 2012 20:01:04 +0200	[thread overview]
Message-ID: <1354298472-3605-2-git-send-email-panto@antoniou-consulting.com> (raw)
In-Reply-To: <1354298472-3605-1-git-send-email-panto@antoniou-consulting.com>

When both CONFIG_USB_GADGET & CONFIG_USB_ETHER are defined
the makefile links objects twice.

The cleanest way to fix is to use a new define, CONFIG_USB_UTIL
which must be defined when either CONFIG_USB_ETHER or
CONFIG_USB_GADGET are defined.

All affected boards have been modified as well.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/usb/gadget/Makefile         | 8 ++++++--
 include/configs/am335x_evm.h        | 1 +
 include/configs/am3517_evm.h        | 1 +
 include/configs/h2200.h             | 1 +
 include/configs/omap3_beagle.h      | 1 +
 include/configs/s5p_goni.h          | 1 +
 include/configs/s5pc210_universal.h | 1 +
 include/configs/trats.h             | 1 +
 8 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 040eaba..167f24f 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -25,15 +25,19 @@ include $(TOPDIR)/config.mk
 
 LIB	:= $(obj)libusb_gadget.o
 
+# required for both USB_GADGET & USB_ETHER
+ifdef CONFIG_USB_UTIL
+COBJS-y += epautoconf.o config.o usbstring.o
+endif
+
 # new USB gadget layer dependencies
 ifdef CONFIG_USB_GADGET
-COBJS-y += epautoconf.o config.o usbstring.o
 COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
 COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
 COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
 endif
 ifdef CONFIG_USB_ETHER
-COBJS-y += ether.o epautoconf.o config.o usbstring.o
+COBJS-y += ether.o
 COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 COBJS-$(CONFIG_MV_UDC)	+= mv_udc.o
 COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ab9549b..ee19e54 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -278,6 +278,7 @@
 
 #ifdef CONFIG_MUSB_GADGET
 #define CONFIG_USB_ETHER
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_ETH_RNDIS
 #endif /* CONFIG_MUSB_GADGET */
 
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index ba15325..3aedff3 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -123,6 +123,7 @@
 #ifdef CONFIG_MUSB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_ETHER
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_ETH_RNDIS
 #endif /* CONFIG_MUSB_GADGET */
 
diff --git a/include/configs/h2200.h b/include/configs/h2200.h
index 516a26e..fc27bf0 100644
--- a/include/configs/h2200.h
+++ b/include/configs/h2200.h
@@ -170,6 +170,7 @@
 
 #define CONFIG_USB_GADGET_PXA2XX
 #define CONFIG_USB_ETHER
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_ETH_SUBSET
 
 #define CONFIG_USBNET_DEV_ADDR		"de:ad:be:ef:00:01"
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 12d65f2..04fbb5d 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -123,6 +123,7 @@
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_TWL4030_USB		1
 #define CONFIG_USB_ETHER
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_ETHER_RNDIS
 
 /* USB EHCI */
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 56e8347..1e180ade 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -231,6 +231,7 @@
 #define CONFIG_I2C_MULTI_BUS
 #define CONFIG_SYS_MAX_I2C_BUS	7
 #define CONFIG_USB_GADGET
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
 
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 894f38b..07ab884 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -258,6 +258,7 @@
 #define CONFIG_POWER_MAX8998
 
 #define CONFIG_USB_GADGET
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
 
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 355029e..7c2c875 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -245,6 +245,7 @@
 #define CONFIG_POWER_BATTERY
 #define CONFIG_POWER_BATTERY_TRATS
 #define CONFIG_USB_GADGET
+#define CONFIG_USB_UTIL
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
-- 
1.7.12

  reply	other threads:[~2012-11-30 18:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 18:01 [U-Boot] [PATCH v3 0/9] USB: Gadget & DFU related fixes Pantelis Antoniou
2012-11-30 18:01 ` Pantelis Antoniou [this message]
2012-12-01  5:30   ` [U-Boot] [PATCH v3 1/9] usb: Fix bug when both DFU & ETHER are defined Marek Vasut
2012-12-03 10:10     ` Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 2/9] g_dnl: Issue connect/disconnect as appropriate Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 3/9] g_dnl: Properly terminate string list Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 4/9] dfu: Only perform DFU board_usb_init() for TRATS Pantelis Antoniou
2012-12-01  5:31   ` Marek Vasut
2012-11-30 18:01 ` [U-Boot] [PATCH v3 5/9] dfu: Fix crash when wrong number of arguments given Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 6/9] dfu: Send correct DFU response from composite_setup Pantelis Antoniou
2012-12-10 17:11   ` Lukasz Majewski
2012-12-10 18:21     ` Pantelis Antoniou
2012-12-10 19:26       ` Lukasz Majewski
2012-12-11  0:47         ` Marek Vasut
2012-12-11  8:40           ` Lukasz Majewski
2012-12-11 10:47           ` Wolfgang Denk
2012-12-11 13:44           ` Tom Rini
2012-12-12 17:55             ` Marek Vasut
2012-12-12 18:03               ` Tom Rini
2012-12-11 11:02         ` Lukasz Majewski
2012-12-11 11:23           ` Pantelis Antoniou
2012-12-11 11:28           ` Robert P. J. Day
2012-12-12 21:42             ` Marek Vasut
2012-12-12 21:40           ` Marek Vasut
2012-12-11 11:18         ` Lukasz Majewski
2012-11-30 18:01 ` [U-Boot] [PATCH v3 7/9] dfu: Properly zero out timeout value Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 8/9] dfu: Add a partition type target Pantelis Antoniou
2012-11-30 18:01 ` [U-Boot] [PATCH v3 9/9] dfu: Support larger than memory transfers Pantelis Antoniou
2013-02-12 20:51   ` Tom Rini
2013-02-18 10:01     ` Lukasz Majewski
2013-02-18 12:38       ` Marek Vasut
2013-02-18 13:51       ` Tom Rini
2013-02-18 21:08       ` Tom Rini
2013-02-20  7:17         ` Lukasz Majewski
2012-12-01  5:32 ` [U-Boot] [PATCH v3 0/9] USB: Gadget & DFU related fixes Marek Vasut

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=1354298472-3605-2-git-send-email-panto@antoniou-consulting.com \
    --to=panto@antoniou-consulting.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.