mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
drivers/usb: regorganisation
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>
This commit is contained in:
committed by
Remy Bohmer
parent
712ac6a1a6
commit
2731b9a866
4
Makefile
4
Makefile
@@ -263,7 +263,9 @@ endif
|
|||||||
LIBS += drivers/rtc/librtc.a
|
LIBS += drivers/rtc/librtc.a
|
||||||
LIBS += drivers/serial/libserial.a
|
LIBS += drivers/serial/libserial.a
|
||||||
LIBS += drivers/twserial/libtws.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/video/libvideo.a
|
||||||
LIBS += drivers/watchdog/libwatchdog.a
|
LIBS += drivers/watchdog/libwatchdog.a
|
||||||
LIBS += common/libcommon.a
|
LIBS += common/libcommon.a
|
||||||
|
@@ -94,7 +94,7 @@ static char serial_number[16];
|
|||||||
* Descriptors, Strings, Local variables.
|
* 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;
|
extern struct usb_string_descriptor **usb_strings;
|
||||||
|
|
||||||
/* Indicies, References */
|
/* Indicies, References */
|
||||||
|
@@ -24,11 +24,11 @@
|
|||||||
#ifndef __USB_TTY_H__
|
#ifndef __USB_TTY_H__
|
||||||
#define __USB_TTY_H__
|
#define __USB_TTY_H__
|
||||||
|
|
||||||
#include <usbdcore.h>
|
#include <usbdevice.h>
|
||||||
#if defined(CONFIG_PPC)
|
#if defined(CONFIG_PPC)
|
||||||
#include <usbdcore_mpc8xx.h>
|
#include <usb/mpc8xx_udc.h>
|
||||||
#elif defined(CONFIG_ARM)
|
#elif defined(CONFIG_ARM)
|
||||||
#include <usbdcore_omap1510.h>
|
#include <usb/omap1510_udc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <version_autogenerated.h>
|
#include <version_autogenerated.h>
|
||||||
|
52
drivers/usb/gadget/Makefile
Normal file
52
drivers/usb/gadget/Makefile
Normal file
@@ -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
|
||||||
|
|
||||||
|
#########################################################################
|
@@ -30,7 +30,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include "usbdcore.h"
|
#include <usbdevice.h>
|
||||||
|
|
||||||
#define MAX_INTERFACES 2
|
#define MAX_INTERFACES 2
|
||||||
|
|
@@ -51,7 +51,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include "usbdcore.h"
|
#include <usbdevice.h>
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args)
|
#define dbg_ep0(lvl,fmt,args...) serial_printf("[%s] %s:%d: "fmt"\n",__FILE__,__FUNCTION__,__LINE__,##args)
|
@@ -3,7 +3,7 @@
|
|||||||
* bodonoghue@CodeHermit.ie
|
* bodonoghue@CodeHermit.ie
|
||||||
*
|
*
|
||||||
* References
|
* References
|
||||||
* DasUBoot/drivers/usb/usbdcore_omap1510.c, for design and implementation
|
* DasUBoot/drivers/usb/gadget/omap1510_udc.c, for design and implementation
|
||||||
* ideas.
|
* ideas.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -59,9 +59,10 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <commproc.h>
|
#include <commproc.h>
|
||||||
#include "usbdcore.h"
|
#include <usbdevice.h>
|
||||||
#include "usbdcore_mpc8xx.h"
|
#include <usb/mpc8xx_udc.h>
|
||||||
#include "usbdcore_ep0.h"
|
|
||||||
|
#include "ep0.h"
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
@@ -31,10 +31,10 @@
|
|||||||
#ifdef CONFIG_OMAP_SX1
|
#ifdef CONFIG_OMAP_SX1
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <usbdevice.h>
|
||||||
|
#include <usb/omap1510_udc.h>
|
||||||
|
|
||||||
#include "usbdcore.h"
|
#include "ep0.h"
|
||||||
#include "usbdcore_omap1510.h"
|
|
||||||
#include "usbdcore_ep0.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define UDC_INIT_MDELAY 80 /* Device settle delay */
|
#define UDC_INIT_MDELAY 80 /* Device settle delay */
|
@@ -23,33 +23,22 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/config.mk
|
include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
LIB := $(obj)libusb.a
|
LIB := $(obj)libusb_host.a
|
||||||
|
|
||||||
# core
|
# ohci
|
||||||
COBJS-y += usbdcore.o
|
COBJS-$(CONFIG_USB_OHCI_NEW) += ohci-hcd.o
|
||||||
COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
|
COBJS-$(CONFIG_USB_ATMEL) += ohci-at91.o
|
||||||
COBJS-$(CONFIG_USB_EHCI) += usb_ehci_core.o
|
|
||||||
|
|
||||||
# host
|
|
||||||
COBJS-$(CONFIG_USB_ATMEL) += atmel_usb.o
|
|
||||||
COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
|
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_S3C64XX) += s3c64xx_usb.o
|
COBJS-$(CONFIG_USB_S3C64XX) += s3c64xx-hcd.o
|
||||||
COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
|
COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.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
|
# echi
|
||||||
ifdef CONFIG_USB_DEVICE
|
COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o
|
||||||
COBJS-y += usbdcore_ep0.o
|
COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
|
||||||
COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
|
COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o
|
||||||
COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
|
COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
|
||||||
COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
|
COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
|
||||||
endif
|
|
||||||
|
|
||||||
COBJS := $(COBJS-y)
|
COBJS := $(COBJS-y)
|
||||||
SRCS := $(COBJS:.o=.c)
|
SRCS := $(COBJS:.o=.c)
|
@@ -26,9 +26,9 @@
|
|||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/bitops.h>
|
#include <asm/bitops.h>
|
||||||
|
|
||||||
#include "usb_ehci.h"
|
#include "ehci.h"
|
||||||
#include "usb_ehci_fsl.h"
|
#include "ehci-fsl.h"
|
||||||
#include "usb_ehci_core.h"
|
#include "ehci-core.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the appropriate control structures to manage
|
* Create the appropriate control structures to manage
|
@@ -25,7 +25,8 @@
|
|||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include "usb_ehci.h"
|
|
||||||
|
#include "ehci.h"
|
||||||
|
|
||||||
int rootdev;
|
int rootdev;
|
||||||
struct ehci_hccr *hccr; /* R/O registers, not need for volatile */
|
struct ehci_hccr *hccr; /* R/O registers, not need for volatile */
|
@@ -21,8 +21,9 @@
|
|||||||
*/
|
*/
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <usb.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
|
* Create the appropriate control structures to manage
|
||||||
* a new EHCI host controller.
|
* a new EHCI host controller.
|
@@ -21,8 +21,9 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
#include <usb.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
|
#ifdef CONFIG_PCI_EHCI_DEVICE
|
||||||
static struct pci_device_id ehci_pci_ids[] = {
|
static struct pci_device_id ehci_pci_ids[] = {
|
@@ -20,8 +20,8 @@
|
|||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
|
|
||||||
#include "usb_ehci.h"
|
#include "ehci.h"
|
||||||
#include "usb_ehci_core.h"
|
#include "ehci-core.h"
|
||||||
|
|
||||||
int vct_ehci_hcd_init(u32 *hccr, u32 *hcor);
|
int vct_ehci_hcd_init(u32 *hccr, u32 *hcor);
|
||||||
|
|
@@ -57,7 +57,8 @@
|
|||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#include "usb_ohci.h"
|
|
||||||
|
#include "ohci.h"
|
||||||
|
|
||||||
#ifdef CONFIG_AT91RM9200
|
#ifdef CONFIG_AT91RM9200
|
||||||
#include <asm/arch/hardware.h> /* needed for AT91_USB_HOST_BASE */
|
#include <asm/arch/hardware.h> /* needed for AT91_USB_HOST_BASE */
|
@@ -40,7 +40,7 @@
|
|||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#include "sl811.h"
|
#include "sl811.h"
|
||||||
|
|
||||||
#include "../../board/kup/common/kup.h"
|
#include "../../../board/kup/common/kup.h"
|
||||||
|
|
||||||
#ifdef __PPC__
|
#ifdef __PPC__
|
||||||
# define EIEIO __asm__ volatile ("eieio")
|
# define EIEIO __asm__ volatile ("eieio")
|
47
drivers/usb/musb/Makefile
Normal file
47
drivers/usb/musb/Makefile
Normal file
@@ -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
|
||||||
|
|
||||||
|
#########################################################################
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include "davinci_usb.h"
|
#include "davinci.h"
|
||||||
|
|
||||||
/* MUSB platform configuration */
|
/* MUSB platform configuration */
|
||||||
struct musb_config musb_cfg = {
|
struct musb_config musb_cfg = {
|
Reference in New Issue
Block a user