All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Anand <pratyush.anand@st.com>
To: <linux-usb@vger.kernel.org>
Cc: viresh.kumar@st.com, vipulkumar.samar@st.com,
	bhupesh.sharma@st.com, tmarri@apm.com, vipin.kumar@st.com,
	shiraz.hashim@st.com, Amit.VIRDI@st.com, rajeev-dlh.kumar@st.com,
	mmiesfeld@apm.com, deepak.sikri@st.com,
	linuxppc-dev@lists.ozlabs.org, fchen@apm.com
Subject: [PATCH 10/14] dwc/otg: Add driver kernel configuration and Makefile
Date: Tue, 30 Aug 2011 17:27:57 +0530	[thread overview]
Message-ID: <2da5e10a283ff182f25b9097f51cc6889db030e4.1314704558.git.pratyush.anand@st.com> (raw)
In-Reply-To: <cover.1314704557.git.pratyush.anand@st.com>

From: Tirumala Marri <tmarri@apm.com>

Add Synopsys DesignWare HS USB OTG driver kernel configuration.
Synopsys OTG driver may operate in  host only, device only, or OTG mode.
The driver also allows user configure the core to use its internal DMA
or Slave (PIO) mode.

Signed-off-by: Tirumala R Marri <tmarri@apm.com>
Signed-off-by: Fushen Chen <fchen@apm.com>
Signed-off-by: Mark Miesfeld <mmiesfeld@apm.com>
---
 drivers/Makefile         |    1 +
 drivers/usb/Kconfig      |    2 +
 drivers/usb/dwc/Kconfig  |   84 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/dwc/Makefile |   19 ++++++++++
 4 files changed, 106 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/dwc/Kconfig
 create mode 100644 drivers/usb/dwc/Makefile

diff --git a/drivers/Makefile b/drivers/Makefile
index a0d5aa60..d951bf6 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -68,6 +68,7 @@ obj-$(CONFIG_PARIDE) 		+= block/paride/
 obj-$(CONFIG_TC)		+= tc/
 obj-$(CONFIG_UWB)		+= uwb/
 obj-$(CONFIG_USB_OTG_UTILS)	+= usb/otg/
+obj-$(CONFIG_USB_DWC_OTG)	+= usb/dwc/
 obj-$(CONFIG_USB)		+= usb/
 obj-$(CONFIG_USB_MUSB_HDRC)	+= usb/musb/
 obj-$(CONFIG_PCI)		+= usb/
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 8cd1df5..963e4b3 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -117,6 +117,8 @@ source "drivers/usb/host/Kconfig"
 
 source "drivers/usb/musb/Kconfig"
 
+source "drivers/usb/dwc/Kconfig"
+
 source "drivers/usb/class/Kconfig"
 
 source "drivers/usb/storage/Kconfig"
diff --git a/drivers/usb/dwc/Kconfig b/drivers/usb/dwc/Kconfig
new file mode 100644
index 0000000..eafc5ed
--- /dev/null
+++ b/drivers/usb/dwc/Kconfig
@@ -0,0 +1,84 @@
+#
+# USB Dual Role (OTG-ready) Controller Drivers
+# for silicon based on Synopsys DesignWare IP
+#
+
+comment "Enable Host or Gadget support for DesignWare OTG controller"
+	depends on !USB && USB_GADGET=n
+
+config USB_DWC_OTG
+	tristate "Synopsys DWC OTG Controller"
+	depends on USB || USB_GADGET
+	select NOP_USB_XCEIV
+	select USB_OTG_UTILS
+	default USB_GADGET
+	help
+	  This driver provides USB Device Controller support for the
+	  Synopsys DesignWare USB OTG Core used on the AppliedMicro PowerPC SoC.
+
+config DWC_DEBUG
+	bool "Enable DWC Debugging"
+	depends on USB_DWC_OTG
+	default n
+	help
+	  Enable DWC driver debugging
+
+choice
+	prompt "DWC Mode Selection"
+	depends on USB_DWC_OTG
+	default DWC_HOST_ONLY
+	help
+	  Select the DWC Core in OTG, Host only, or Device only mode.
+
+config DWC_HOST_ONLY
+	bool "DWC Host Only Mode"
+
+config DWC_OTG_MODE
+	bool "DWC OTG Mode"
+	select USB_GADGET_SELECTED
+
+config DWC_DEVICE_ONLY
+	bool "DWC Device Only Mode"
+	select USB_GADGET_SELECTED
+
+endchoice
+
+# enable peripheral support (including with OTG)
+choice
+	prompt "DWC DMA/SlaveMode Selection"
+	depends on USB_DWC_OTG
+	default DWC_DMA_MODE
+	help
+	  Select the DWC DMA or Slave Mode.
+	  DMA mode uses the DWC core internal DMA engines.
+	  Slave mode uses the processor PIO to tranfer data.
+	  In Slave mode, processor's DMA channels can be used if available.
+
+config DWC_SLAVE
+	bool "DWC Slave Mode"
+
+config DWC_DMA_MODE
+	bool "DWC DMA Mode"
+
+endchoice
+
+config DWC_OTG_REG_LE
+	bool "DWC Little Endian Register"
+	depends on USB_DWC_OTG
+	default y
+	help
+	  OTG core register access is Little-Endian.
+
+config DWC_OTG_FIFO_LE
+	bool "DWC FIFO Little Endian"
+	depends on USB_DWC_OTG
+	default n
+	help
+	  OTG core FIFO access is Little-Endian.
+
+config DWC_LIMITED_XFER_SIZE
+	bool "DWC Endpoint Limited Xfer Size"
+	depends on USB_GADGET_DWC_HDRC
+	default n
+	help
+	  Bit fields in the Device EP Transfer Size Register is 11 bits.
diff --git a/drivers/usb/dwc/Makefile b/drivers/usb/dwc/Makefile
new file mode 100644
index 0000000..4102add
--- /dev/null
+++ b/drivers/usb/dwc/Makefile
@@ -0,0 +1,19 @@
+#
+# OTG infrastructure and transceiver drivers
+#
+obj-$(CONFIG_USB_DWC_OTG)	+= dwc.o
+
+dwc-objs := cil.o cil_intr.o param.o
+
+ifeq ($(CONFIG_4xx_SOC),y)
+dwc-objs += apmppc.o
+endif
+
+ifneq ($(CONFIG_DWC_DEVICE_ONLY),y)
+dwc-objs += hcd.o hcd_intr.o \
+		hcd_queue.o
+endif
+
+ifneq ($(CONFIG_DWC_HOST_ONLY),y)
+dwc-objs += pcd.o pcd_intr.o
+endif
-- 
1.7.2.2

  parent reply	other threads:[~2011-08-30 12:26 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 11:57 [PATCH 00/14] Modifications for DWC OTG since v13 Pratyush Anand
2011-08-30 11:57 ` [PATCH 01/14] dwc/otg: Add Register definitions Pratyush Anand
2011-08-31 22:35   ` Greg KH
2011-09-02 11:31     ` Pratyush Anand
2011-08-30 11:57 ` [PATCH 02/14] dwc/otg: Structure declaration for shared data Pratyush Anand
2011-08-30 15:29   ` Tirumala Marri
2011-08-30 15:43     ` Pratyush Anand
2011-08-31 17:17       ` Tirumala Marri
2011-09-02 11:42         ` Pratyush Anand
2011-09-02 12:30           ` Alexander Gordeev
2011-09-02 16:40             ` Tirumala Marri
2011-09-02 16:37           ` Tirumala Marri
2011-08-31 22:36     ` Greg KH
2011-09-01  0:18       ` Josh Boyer
2011-09-01  1:37         ` Greg KH
2011-08-31 22:36   ` Greg KH
2011-09-02 11:49     ` Pratyush Anand
2011-09-02 13:57       ` Greg KH
2011-08-30 11:57 ` [PATCH 03/14] dwc/otg: Add driver framework Pratyush Anand
2011-08-31  7:19   ` Sebastian Andrzej Siewior
2011-09-02 11:17     ` Pratyush Anand
2011-09-02 11:32       ` Sebastian Andrzej Siewior
2011-09-02 11:55         ` Pratyush Anand
2011-08-30 11:57 ` [PATCH 04/14] dwc/otg: Add Core Interface Layer (CIL) Pratyush Anand
2011-08-30 11:57 ` [PATCH 05/14] dwc/otg: Add HCD function Pratyush Anand
2011-08-30 11:57 ` [PATCH 06/14] dwc/otg: Add HCD interrupt function Pratyush Anand
2011-08-30 11:57 ` [PATCH 07/14] dwc/otg: Add HCD queue function Pratyush Anand
2011-08-30 11:57 ` [PATCH 08/14] dwc/otg: Add PCD function Pratyush Anand
2011-08-31  7:44   ` Sebastian Andrzej Siewior
2011-09-02 11:26     ` Pratyush Anand
2011-08-30 11:57 ` [PATCH 09/14] dwc/otg: Add PCD interrupt function Pratyush Anand
2011-08-30 11:57 ` Pratyush Anand [this message]
2011-08-30 11:57 ` [PATCH 11/14] dwc/otg: Driver enable gadget support Pratyush Anand
2011-08-30 13:01   ` Sergei Shtylyov
2011-08-30 15:40     ` Pratyush Anand
2011-08-30 11:57 ` [PATCH 12/14] include/linux/usb/gadget.h : include <linux/device.h> for successful compilation Pratyush Anand
2011-08-30 12:57   ` Sergei Shtylyov
2011-08-30 11:58 ` [PATCH 13/14] usb/gadget/kconfig: added dwc otg as an option for peripheral controller Pratyush Anand
2011-08-30 11:58 ` [PATCH 14/14] arm/include/asm/io.h : added macros to read/write big/little endian register Pratyush Anand
2011-08-31  7:35   ` Sebastian Andrzej Siewior
2011-09-02 10:43     ` Pratyush Anand
2011-09-02 11:02       ` Benjamin Herrenschmidt
2011-09-02 11:01   ` Benjamin Herrenschmidt
2011-09-05 14:28     ` Sebastian Andrzej Siewior
2011-09-05 17:16       ` Benjamin Herrenschmidt
2011-08-30 15:27 ` [PATCH 00/14] Modifications for DWC OTG since v13 Tirumala Marri
2011-08-30 15:46   ` Pratyush Anand
2011-08-31  1:18     ` Kyungmin Park
2011-08-31  6:49       ` Alexander Gordeev
2011-08-31  7:03       ` Pratyush Anand
2011-08-31 20:33 ` Felipe Balbi

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=2da5e10a283ff182f25b9097f51cc6889db030e4.1314704558.git.pratyush.anand@st.com \
    --to=pratyush.anand@st.com \
    --cc=Amit.VIRDI@st.com \
    --cc=bhupesh.sharma@st.com \
    --cc=deepak.sikri@st.com \
    --cc=fchen@apm.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mmiesfeld@apm.com \
    --cc=rajeev-dlh.kumar@st.com \
    --cc=shiraz.hashim@st.com \
    --cc=tmarri@apm.com \
    --cc=vipin.kumar@st.com \
    --cc=vipulkumar.samar@st.com \
    --cc=viresh.kumar@st.com \
    /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.