]> git.sur5r.net Git - u-boot/commitdiff
drivers/usb: Move conditional compilation to Makefile
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Fri, 7 Nov 2008 21:46:21 +0000 (22:46 +0100)
committerRemy Böhmer <linux@bohmer.net>
Fri, 28 Nov 2008 20:24:12 +0000 (21:24 +0100)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Böhmer <linux@bohmer.net>
drivers/usb/Makefile
drivers/usb/isp116x-hcd.c
drivers/usb/sl811_usb.c
drivers/usb/usb_ohci.c
drivers/usb/usbdcore_ep0.c
drivers/usb/usbdcore_mpc8xx.c
drivers/usb/usbdcore_omap1510.c

index c67a490f0a9657eca3bf6fa2b4bced363123a7b6..856f51a75f1890783fd533babf36c811ee031ef3 100644 (file)
@@ -25,15 +25,22 @@ include $(TOPDIR)/config.mk
 
 LIB    := $(obj)libusb.a
 
 
 LIB    := $(obj)libusb.a
 
+# core
+COBJS-y += usbdcore.o
+COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
+
+# host
+COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
 COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
+COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
 
 
-COBJS-y += isp116x-hcd.o
-COBJS-y += sl811_usb.o
-COBJS-y += usb_ohci.o
-COBJS-y += usbdcore.o
+# device
+ifdef CONFIG_USB_DEVICE
 COBJS-y += usbdcore_ep0.o
 COBJS-y += usbdcore_ep0.o
-COBJS-y += usbdcore_mpc8xx.o
-COBJS-y += usbdcore_omap1510.o
+COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
+COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
+COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+endif
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
index cc46dfe9f3a9860e51f11bb4849c330e45664a51..348e404fe6832abe1a2f3e09896287f7a8a0c06f 100644 (file)
@@ -56,8 +56,6 @@
  */
 
 #include <common.h>
  */
 
 #include <common.h>
-
-#ifdef CONFIG_USB_ISP116X_HCD
 #include <asm/io.h>
 #include <usb.h>
 #include <malloc.h>
 #include <asm/io.h>
 #include <usb.h>
 #include <malloc.h>
@@ -1441,5 +1439,3 @@ int usb_lowlevel_stop(void)
 
        return 0;
 }
 
        return 0;
 }
-
-#endif                         /* CONFIG_USB_ISP116X_HCD */
index 48f1ee95f5ab2b44128fed3af8c8bb71ef66e62e..a03e469d1e744313be10d85a5160f043871e29d0 100644 (file)
@@ -36,7 +36,6 @@
  */
 
 #include <common.h>
  */
 
 #include <common.h>
-#ifdef CONFIG_USB_SL811HS
 #include <mpc8xx.h>
 #include <usb.h>
 #include "sl811.h"
 #include <mpc8xx.h>
 #include <usb.h>
 #include "sl811.h"
@@ -733,5 +732,3 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
 
        return status == 0 ? len : status;
 }
 
        return status == 0 ? len : status;
 }
-
-#endif /* CONFIG_USB_SL811HS */
index e03371c09a17267d084c3b3caa5cf450f64ea51c..d68fdcf0689de1fe684bdf94b8f036e7f6306533 100644 (file)
@@ -46,9 +46,6 @@
  */
 
 #include <common.h>
  */
 
 #include <common.h>
-
-#ifdef CONFIG_USB_OHCI_NEW
-
 #include <asm/byteorder.h>
 
 #if defined(CONFIG_PCI_OHCI)
 #include <asm/byteorder.h>
 
 #if defined(CONFIG_PCI_OHCI)
@@ -2016,4 +2013,3 @@ int usb_lowlevel_stop(void)
        ohci_inited = 0;
        return 0;
 }
        ohci_inited = 0;
        return 0;
 }
-#endif /* CONFIG_USB_OHCI_NEW */
index cf3f3826cbfc08de3097fd9d1a4b061b25604a11..f6e017df1804dc9409fc774cec36031d3318c4df 100644 (file)
@@ -51,8 +51,6 @@
  */
 
 #include <common.h>
  */
 
 #include <common.h>
-
-#if defined(CONFIG_USB_DEVICE)
 #include "usbdcore.h"
 
 #if 0
 #include "usbdcore.h"
 
 #if 0
@@ -597,5 +595,3 @@ int ep0_recv_setup (struct urb *urb)
        }
        return -1;
 }
        }
        return -1;
 }
-
-#endif
index 53bde0dca34e009c1d1b6cc13fe80d3e2467259a..0e311ada156045c6e60b58328cd1997abad7dc16 100644 (file)
@@ -58,8 +58,6 @@
  */
 #include <common.h>
 #include <config.h>
  */
 #include <common.h>
 #include <config.h>
-
-#if defined(CONFIG_MPC885_FAMILY) && defined(CONFIG_USB_DEVICE)
 #include <commproc.h>
 #include "usbdcore.h"
 #include "usbdcore_mpc8xx.h"
 #include <commproc.h>
 #include "usbdcore.h"
 #include "usbdcore_mpc8xx.h"
@@ -1398,5 +1396,3 @@ static u32 mpc8xx_udc_alloc (u32 data_size, u32 alignment)
 
        return retaddr;
 }
 
        return retaddr;
 }
-
-#endif /* CONFIG_MPC885_FAMILY && CONFIG_USB_DEVICE) */
index 4e3239f5809a5d0818129b00fe70b753c2d6fde4..cb9dc442e7bf8f3d8efc95cd2b67ca695a984fa1 100644 (file)
@@ -27,9 +27,6 @@
  */
 
 #include <common.h>
  */
 
 #include <common.h>
-
-#if ((defined(CONFIG_OMAP1510) || defined(CONFIG_OMAP1610)) && defined(CONFIG_USB_DEVICE))
-
 #include <asm/io.h>
 #ifdef CONFIG_OMAP_SX1
 #include <i2c.h>
 #include <asm/io.h>
 #ifdef CONFIG_OMAP_SX1
 #include <i2c.h>
@@ -1566,4 +1563,3 @@ void udc_unset_nak (int epid)
 {
        /* TODO: implement this functionality in omap1510 */
 }
 {
        /* TODO: implement this functionality in omap1510 */
 }
-#endif