]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
drivers/usb: regorganisation
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Fri, 3 Apr 2009 10:46:58 +0000 (12:46 +0200)
committerRemy Bohmer <linux@bohmer.net>
Mon, 6 Apr 2009 18:40:46 +0000 (20:40 +0200)
move to linux usb driver organisation

as following

drivers/usb/gadget
drivers/usb/host
drivers/usb/musb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
38 files changed:
Makefile
drivers/serial/usbtty.c
drivers/serial/usbtty.h
drivers/usb/gadget/Makefile [new file with mode: 0644]
drivers/usb/gadget/core.c [moved from drivers/usb/usbdcore.c with 99% similarity]
drivers/usb/gadget/ep0.c [moved from drivers/usb/usbdcore_ep0.c with 99% similarity]
drivers/usb/gadget/ep0.h [moved from include/usbdcore_ep0.h with 100% similarity]
drivers/usb/gadget/mpc8xx_udc.c [moved from drivers/usb/usbdcore_mpc8xx.c with 99% similarity]
drivers/usb/gadget/omap1510_udc.c [moved from drivers/usb/usbdcore_omap1510.c with 99% similarity]
drivers/usb/host/Makefile [moved from drivers/usb/Makefile with 64% similarity]
drivers/usb/host/ehci-core.h [moved from drivers/usb/usb_ehci_core.h with 100% similarity]
drivers/usb/host/ehci-fsl.c [moved from drivers/usb/usb_ehci_fsl.c with 97% similarity]
drivers/usb/host/ehci-fsl.h [moved from drivers/usb/usb_ehci_fsl.h with 100% similarity]
drivers/usb/host/ehci-hcd.c [moved from drivers/usb/usb_ehci_core.c with 99% similarity]
drivers/usb/host/ehci-ixp4xx.c [moved from drivers/usb/usb_ehci_ixp.c with 96% similarity]
drivers/usb/host/ehci-pci.c [moved from drivers/usb/usb_ehci_pci.c with 97% similarity]
drivers/usb/host/ehci-vct.c [moved from drivers/usb/usb_ehci_vct.c with 96% similarity]
drivers/usb/host/ehci.h [moved from drivers/usb/usb_ehci.h with 100% similarity]
drivers/usb/host/isp116x-hcd.c [moved from drivers/usb/isp116x-hcd.c with 100% similarity]
drivers/usb/host/isp116x.h [moved from drivers/usb/isp116x.h with 100% similarity]
drivers/usb/host/ohci-at91.c [moved from drivers/usb/atmel_usb.c with 100% similarity]
drivers/usb/host/ohci-hcd.c [moved from drivers/usb/usb_ohci.c with 99% similarity]
drivers/usb/host/ohci.h [moved from drivers/usb/usb_ohci.h with 100% similarity]
drivers/usb/host/r8a66597-hcd.c [moved from drivers/usb/r8a66597-hcd.c with 100% similarity]
drivers/usb/host/r8a66597.h [moved from drivers/usb/r8a66597.h with 100% similarity]
drivers/usb/host/s3c64xx-hcd.c [moved from drivers/usb/s3c64xx_usb.c with 100% similarity]
drivers/usb/host/sl811-hcd.c [moved from drivers/usb/sl811_usb.c with 99% similarity]
drivers/usb/host/sl811.h [moved from drivers/usb/sl811.h with 100% similarity]
drivers/usb/musb/Makefile [new file with mode: 0644]
drivers/usb/musb/davinci.c [moved from drivers/usb/davinci_usb.c with 99% similarity]
drivers/usb/musb/davinci.h [moved from drivers/usb/davinci_usb.h with 100% similarity]
drivers/usb/musb/musb_core.c [moved from drivers/usb/musb_core.c with 100% similarity]
drivers/usb/musb/musb_core.h [moved from drivers/usb/musb_core.h with 100% similarity]
drivers/usb/musb/musb_hcd.c [moved from drivers/usb/musb_hcd.c with 100% similarity]
drivers/usb/musb/musb_hcd.h [moved from drivers/usb/musb_hcd.h with 100% similarity]
include/usb/mpc8xx_udc.h [moved from include/usbdcore_mpc8xx.h with 100% similarity]
include/usb/omap1510_udc.h [moved from include/usbdcore_omap1510.h with 100% similarity]
include/usbdevice.h [moved from include/usbdcore.h with 100% similarity]

index 49b83c0c4906371a7ff15d63ba2c8fcbc47935cb..e91c051f5e6f0b2091366acb3a32218badf6f1c9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -263,7 +263,9 @@ endif
 LIBS += drivers/rtc/librtc.a
 LIBS += drivers/serial/libserial.a
 LIBS += drivers/twserial/libtws.a
-LIBS += drivers/usb/libusb.a
+LIBS += drivers/usb/gadget/libusb_gadget.a
+LIBS += drivers/usb/host/libusb_host.a
+LIBS += drivers/usb/musb/libusb_musb.a
 LIBS += drivers/video/libvideo.a
 LIBS += drivers/watchdog/libwatchdog.a
 LIBS += common/libcommon.a
index d8b13879176491c7ede5eb46e10d7a18f5174a5b..f711d0b18b1a967877698d271bd5a4fff915fab6 100644 (file)
@@ -94,7 +94,7 @@ static char serial_number[16];
  * Descriptors, Strings, Local variables.
  */
 
-/* defined and used by usbdcore_ep0.c */
+/* defined and used by gadget/ep0.c */
 extern struct usb_string_descriptor **usb_strings;
 
 /* Indicies, References */
index ecefde549208abfaf7e05b7cea4b141b3402e7e0..77db972b8765294088e35674036fc2dc330b912e 100644 (file)
 #ifndef __USB_TTY_H__
 #define __USB_TTY_H__
 
-#include <usbdcore.h>
+#include <usbdevice.h>
 #if defined(CONFIG_PPC)
-#include <usbdcore_mpc8xx.h>
+#include <usb/mpc8xx_udc.h>
 #elif defined(CONFIG_ARM)
-#include <usbdcore_omap1510.h>
+#include <usb/omap1510_udc.h>
 #endif
 
 #include <version_autogenerated.h>
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
new file mode 100644 (file)
index 0000000..251724f
--- /dev/null
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2000-2007
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    := $(obj)libusb_gadget.a
+
+ifdef CONFIG_USB_DEVICE
+COBJS-y += core.o
+COBJS-y += ep0.o
+COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
+COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
+COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
+endif
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+all:   $(LIB)
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
similarity index 99%
rename from drivers/usb/usbdcore.c
rename to drivers/usb/gadget/core.c
index 53ed669e971580ff249019d9197aee114c94c15a..67b6681a6cce225ffefc49bfa64d10e910915fb5 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 #include <malloc.h>
-#include "usbdcore.h"
+#include <usbdevice.h>
 
 #define MAX_INTERFACES 2
 
similarity index 99%
rename from drivers/usb/usbdcore_ep0.c
rename to drivers/usb/gadget/ep0.c
index f6e017df1804dc9409fc774cec36031d3318c4df..2b4ec44e161768b2e6e5fb3eeccda344ae524325 100644 (file)
@@ -51,7 +51,7 @@
  */
 
 #include <common.h>
-#include "usbdcore.h"
+#include <usbdevice.h>
 
 #if 0
 #define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args)
similarity index 99%
rename from drivers/usb/usbdcore_mpc8xx.c
rename to drivers/usb/gadget/mpc8xx_udc.c
index 0e311ada156045c6e60b58328cd1997abad7dc16..da3fbba72204564e7ca6a82fc7e560a36034cb41 100644 (file)
@@ -3,7 +3,7 @@
  * bodonoghue@CodeHermit.ie
  *
  * References
- * DasUBoot/drivers/usb/usbdcore_omap1510.c, for design and implementation
+ * DasUBoot/drivers/usb/gadget/omap1510_udc.c, for design and implementation
  * ideas.
  *
  * This program is free software; you can redistribute it and/or modify
 #include <common.h>
 #include <config.h>
 #include <commproc.h>
-#include "usbdcore.h"
-#include "usbdcore_mpc8xx.h"
-#include "usbdcore_ep0.h"
+#include <usbdevice.h>
+#include <usb/mpc8xx_udc.h>
+
+#include "ep0.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
similarity index 99%
rename from drivers/usb/usbdcore_omap1510.c
rename to drivers/usb/gadget/omap1510_udc.c
index 6b7b61b3216a6fc4415eb81650f5a5a403763542..90f79070da53fa74941ede6b9f97fed4fbcd48a2 100644 (file)
 #ifdef CONFIG_OMAP_SX1
 #include <i2c.h>
 #endif
+#include <usbdevice.h>
+#include <usb/omap1510_udc.h>
 
-#include "usbdcore.h"
-#include "usbdcore_omap1510.h"
-#include "usbdcore_ep0.h"
+#include "ep0.h"
 
 
 #define UDC_INIT_MDELAY                     80 /* Device settle delay */
similarity index 64%
rename from drivers/usb/Makefile
rename to drivers/usb/host/Makefile
index 5523cbdd67a41331a6ab9ce9792fa0e69fda3b4c..ec1d689b3558f3f54b2269da3158c8baa6d749b2 100644 (file)
 
 include $(TOPDIR)/config.mk
 
-LIB    := $(obj)libusb.a
+LIB    := $(obj)libusb_host.a
 
-# core
-COBJS-y += usbdcore.o
-COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
-COBJS-$(CONFIG_USB_EHCI) += usb_ehci_core.o
-
-# host
-COBJS-$(CONFIG_USB_ATMEL) += atmel_usb.o
+# ohci
+COBJS-$(CONFIG_USB_OHCI_NEW) += ohci-hcd.o
+COBJS-$(CONFIG_USB_ATMEL) += ohci-at91.o
 COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
-COBJS-$(CONFIG_USB_S3C64XX) += s3c64xx_usb.o
-COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
-COBJS-$(CONFIG_USB_EHCI_FSL) += usb_ehci_fsl.o
-COBJS-$(CONFIG_USB_EHCI_PCI) += usb_ehci_pci.o
-COBJS-$(CONFIG_USB_EHCI_IXP4XX) += usb_ehci_ixp.o
-COBJS-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o
-COBJS-$(CONFIG_USB_DAVINCI) += davinci_usb.o
-COBJS-$(CONFIG_USB_EHCI_VCT) += usb_ehci_vct.o
-
-# device
-ifdef CONFIG_USB_DEVICE
-COBJS-y += usbdcore_ep0.o
-COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
-COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
-COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
-endif
+COBJS-$(CONFIG_USB_S3C64XX) += s3c64xx-hcd.o
+COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o
+
+# echi
+COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o
+COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
+COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o
+COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
+COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
similarity index 97%
rename from drivers/usb/usb_ehci_fsl.c
rename to drivers/usb/host/ehci-fsl.c
index 81d5d21657a5296438a1720c28974d995d4f0ff8..86ee1d57173ca88a01156eecbd87aba4119688a6 100644 (file)
@@ -26,9 +26,9 @@
 #include <asm/io.h>
 #include <asm/bitops.h>
 
-#include "usb_ehci.h"
-#include "usb_ehci_fsl.h"
-#include "usb_ehci_core.h"
+#include "ehci.h"
+#include "ehci-fsl.h"
+#include "ehci-core.h"
 
 /*
  * Create the appropriate control structures to manage
similarity index 99%
rename from drivers/usb/usb_ehci_core.c
rename to drivers/usb/host/ehci-hcd.c
index 4dbfb6688fa17cae34460f2aaebbf9f8bffcbbab..bbd547b3e357fb8011702d34d9a26c9b546e5a27 100644 (file)
@@ -25,7 +25,8 @@
 #include <usb.h>
 #include <asm/io.h>
 #include <malloc.h>
-#include "usb_ehci.h"
+
+#include "ehci.h"
 
 int rootdev;
 struct ehci_hccr *hccr;        /* R/O registers, not need for volatile */
similarity index 96%
rename from drivers/usb/usb_ehci_ixp.c
rename to drivers/usb/host/ehci-ixp4xx.c
index 25c18c104e27b0ed0f674ac342dec3c1c8cafd63..b8f15ae52a79edf3aece0ed6e79ffef3b29e2e4b 100644 (file)
@@ -21,8 +21,9 @@
  */
 #include <common.h>
 #include <usb.h>
-#include "usb_ehci.h"
-#include "usb_ehci_core.h"
+
+#include "ehci.h"
+#include "ehci-core.h"
 /*
  * Create the appropriate control structures to manage
  * a new EHCI host controller.
similarity index 97%
rename from drivers/usb/usb_ehci_pci.c
rename to drivers/usb/host/ehci-pci.c
index 3e7143cd91dd44e600552d823cb4ec27d964900e..441b1a271439580d3b6e7388817e7a2ac7a9418f 100644 (file)
@@ -21,8 +21,9 @@
 #include <common.h>
 #include <pci.h>
 #include <usb.h>
-#include "usb_ehci.h"
-#include "usb_ehci_core.h"
+
+#include "ehci.h"
+#include "ehci-core.h"
 
 #ifdef CONFIG_PCI_EHCI_DEVICE
 static struct pci_device_id ehci_pci_ids[] = {
similarity index 96%
rename from drivers/usb/usb_ehci_vct.c
rename to drivers/usb/host/ehci-vct.c
index 89daaaf26df8338209dc4bc104d8bb55f8cdb82f..3063dd172f510d11197f9113f9e324c40282d05f 100644 (file)
@@ -20,8 +20,8 @@
 #include <common.h>
 #include <usb.h>
 
-#include "usb_ehci.h"
-#include "usb_ehci_core.h"
+#include "ehci.h"
+#include "ehci-core.h"
 
 int vct_ehci_hcd_init(u32 *hccr, u32 *hcor);
 
similarity index 99%
rename from drivers/usb/usb_ohci.c
rename to drivers/usb/host/ohci-hcd.c
index 0bbee0f47b7f66e27e03ca96ef2ac8165fa94bfc..e2f289e6d6892ad5b8adaea16a0d1a5a76e0585f 100644 (file)
@@ -57,7 +57,8 @@
 
 #include <malloc.h>
 #include <usb.h>
-#include "usb_ohci.h"
+
+#include "ohci.h"
 
 #ifdef CONFIG_AT91RM9200
 #include <asm/arch/hardware.h> /* needed for AT91_USB_HOST_BASE */
similarity index 99%
rename from drivers/usb/sl811_usb.c
rename to drivers/usb/host/sl811-hcd.c
index a03e469d1e744313be10d85a5160f043871e29d0..82a8b365f4e67343e07fb604cf63482b024e5497 100644 (file)
@@ -40,7 +40,7 @@
 #include <usb.h>
 #include "sl811.h"
 
-#include "../../board/kup/common/kup.h"
+#include "../../../board/kup/common/kup.h"
 
 #ifdef __PPC__
 # define EIEIO         __asm__ volatile ("eieio")
similarity index 100%
rename from drivers/usb/sl811.h
rename to drivers/usb/host/sl811.h
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
new file mode 100644 (file)
index 0000000..09e0a5f
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2000-2007
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    := $(obj)libusb_musb.a
+
+COBJS-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o
+COBJS-$(CONFIG_USB_DAVINCI) += davinci.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+all:   $(LIB)
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
similarity index 99%
rename from drivers/usb/davinci_usb.c
rename to drivers/usb/musb/davinci.c
index e66f660feefa536fe3b5be09b2421fbdc41655c2..a7648fc452be64f80867636f4214c7b7fa4f9e55 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include "davinci_usb.h"
+#include "davinci.h"
 
 /* MUSB platform configuration */
 struct musb_config musb_cfg = {
similarity index 100%
rename from include/usbdcore.h
rename to include/usbdevice.h