diff options
author | John Crispin <blogic@openwrt.org> | 2013-09-19 05:56:31 +0000 | ||||||
---|---|---|---|---|---|---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-09-19 05:56:31 +0000 | ||||||
commit | 9da7aa5626e23ada05256542014c1e70dac4a938 (patch) | |||||||
tree | 914312261b40d77e369bc4f79d257b04e130afa3 /target/linux/ramips/patches-3.10/0202-owrt-USB-adds-dwc_otg.patch | |||||||
parent | 3794485996aa66ccaae0bb8d934699f5832f5f5c (diff) | |||||||
download | -rw-r--r-- | target/linux/ramips/patches-3.10/0202-owrt-USB-adds-dwc_otg.patch | 24517 |
1 files changed, 24517 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.10/0202-owrt-USB-adds-dwc_otg.patch b/target/linux/ramips/patches-3.10/0202-owrt-USB-adds-dwc_otg.patch new file mode 100644 index 0000000000..70513be3d7 --- /dev/null +++ b/target/linux/ramips/patches-3.10/0202-owrt-USB-adds-dwc_otg.patch @@ -0,0 +1,24517 @@ +From 1a44a003bdaf917193114d0d40534496c39644ba Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Fri, 15 Mar 2013 20:58:18 +0100 +Subject: [PATCH 202/208] owrt: USB: adds dwc_otg + +Signed-off-by: John Crispin <blogic@openwrt.org> +--- + drivers/usb/Kconfig | 2 + + drivers/usb/Makefile | 1 + + drivers/usb/dwc_otg/Kconfig | 24 + + drivers/usb/dwc_otg/Makefile | 25 + + drivers/usb/dwc_otg/dummy_audio.c | 1575 +++++++++++++ + drivers/usb/dwc_otg/dwc_otg_attr.c | 966 ++++++++ + drivers/usb/dwc_otg/dwc_otg_attr.h | 67 + + drivers/usb/dwc_otg/dwc_otg_cil.c | 3692 ++++++++++++++++++++++++++++++ + drivers/usb/dwc_otg/dwc_otg_cil.h | 1098 +++++++++ + drivers/usb/dwc_otg/dwc_otg_cil_intr.c | 750 ++++++ + drivers/usb/dwc_otg/dwc_otg_driver.c | 1273 ++++++++++ + drivers/usb/dwc_otg/dwc_otg_driver.h | 83 + + drivers/usb/dwc_otg/dwc_otg_hcd.c | 2852 +++++++++++++++++++++++ + drivers/usb/dwc_otg/dwc_otg_hcd.h | 668 ++++++ + drivers/usb/dwc_otg/dwc_otg_hcd_intr.c | 1873 +++++++++++++++ + drivers/usb/dwc_otg/dwc_otg_hcd_queue.c | 684 ++++++ + drivers/usb/dwc_otg/dwc_otg_pcd.c | 2523 ++++++++++++++++++++ + drivers/usb/dwc_otg/dwc_otg_pcd.h | 248 ++ + drivers/usb/dwc_otg/dwc_otg_pcd_intr.c | 3654 +++++++++++++++++++++++++++++ + drivers/usb/dwc_otg/dwc_otg_regs.h | 2075 +++++++++++++++++ + drivers/usb/dwc_otg/linux/dwc_otg_plat.h | 260 +++ + 21 files changed, 24393 insertions(+) + create mode 100644 drivers/usb/dwc_otg/Kconfig + create mode 100644 drivers/usb/dwc_otg/Makefile + create mode 100644 drivers/usb/dwc_otg/dummy_audio.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_attr.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_attr.h + create mode 100644 drivers/usb/dwc_otg/dwc_otg_cil.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_cil.h + create mode 100644 drivers/usb/dwc_otg/dwc_otg_cil_intr.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_driver.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_driver.h + create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd.h + create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd_intr.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_hcd_queue.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_pcd.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_pcd.h + create mode 100644 drivers/usb/dwc_otg/dwc_otg_pcd_intr.c + create mode 100644 drivers/usb/dwc_otg/dwc_otg_regs.h + create mode 100644 drivers/usb/dwc_otg/linux/dwc_otg_plat.h + +--- a/drivers/usb/Kconfig ++++ b/drivers/usb/Kconfig +@@ -126,6 +126,8 @@ source "drivers/usb/core/Kconfig" + + source "drivers/usb/dwc3/Kconfig" + ++source "drivers/usb/dwc_otg/Kconfig" ++ + source "drivers/usb/mon/Kconfig" + + source "drivers/usb/wusbcore/Kconfig" +--- a/drivers/usb/Makefile ++++ b/drivers/usb/Makefile +@@ -9,6 +9,7 @@ obj-$(CONFIG_USB) += core/ + obj-$(CONFIG_USB_OTG_UTILS) += otg/ + + obj-$(CONFIG_USB_DWC3) += dwc3/ ++obj-$(CONFIG_DWC_OTG) += dwc_otg/ + + obj-$(CONFIG_USB_MON) += mon/ + +--- /dev/null ++++ b/drivers/usb/dwc_otg/Kconfig +@@ -0,0 +1,24 @@ ++config DWC_OTG ++ tristate "Ralink RT305X DWC_OTG support" ++ depends on SOC_RT305X ++ ---help--- ++ This driver supports Ralink DWC_OTG ++ ++choice ++ prompt "USB Operation Mode" ++ depends on DWC_OTG ++ default DWC_OTG_HOST_ONLY ++ ++config DWC_OTG_HOST_ONLY ++ bool "HOST ONLY MODE" ++ depends on DWC_OTG ++ ++config DWC_OTG_DEVICE_ONLY ++ bool "DEVICE ONLY MODE" ++ depends on DWC_OTG ++ ++endchoice ++ ++config DWC_OTG_DEBUG ++ bool "Enable debug mode" ++ depends on DWC_OTG +--- /dev/null ++++ b/drivers/usb/dwc_otg/Makefile +@@ -0,0 +1,25 @@ ++# ++# Makefile for DWC_otg Highspeed USB controller driver ++# ++ ++ifeq ($(CONFIG_DWC_OTG_DEBUG),y) ++EXTRA_CFLAGS += -DDEBUG ++endif ++ ++# Use one of the following flags to compile the software in host-only or ++# device-only mode. ++ifeq ($(CONFIG_DWC_OTG_HOST_ONLY),y) ++EXTRA_CFLAGS += -DDWC_HOST_ONLY ++EXTRA_CFLAGS += -DDWC_EN_ISOC ++endif ++ ++ifeq ($(CONFIG_DWC_OTG_DEVICE_ONLY),y) ++EXTRA_CFLAGS += -DDWC_DEVICE_ONLY ++endif ++ ++obj-$(CONFIG_DWC_OTG) := dwc_otg.o ++ ++dwc_otg-objs := dwc_otg_driver.o dwc_otg_attr.o ++dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o ++dwc_otg-objs += dwc_otg_pcd.o dwc_otg_pcd_intr.o ++dwc_otg-objs += dwc_otg_hcd.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o +--- /dev/null ++++ b/drivers/usb/dwc_otg/dummy_audio.c +@@ -0,0 +1,1575 @@ ++/* ++ * zero.c -- Gadget Zero, for USB development ++ * ++ * Copyright (C) 2003-2004 David Brownell ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions, and the following disclaimer, ++ * without modification. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. The names of the above-listed copyright holders may not be used ++ * to endorse or promote products derived from this software without ++ * specific prior written permission. ++ * ++ * ALTERNATIVELY, this software may be distributed under the terms of the ++ * GNU General Public License ("GPL") as published by the Free Software ++ * Foundation, either version 2 of that License or (at your option) any ++ * later version. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ++ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, ++ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ++ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ++ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ++ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++ ++/* ++ * Gadget Zero only needs two bulk endpoints, and is an example of how you ++ * can write a hardware-agnostic gadget driver running inside a USB device. ++ * ++ * Hardware details are visible (see CONFIG_USB_ZERO_* below) but don't ++ * affect most of the driver. ++ * ++ * Use it with the Linux host/master side "usbtest" driver to get a basic ++ * functional test of your device-side usb stack, or with "usb |