linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support
@ 2011-03-28 18:28 tmarri
  2011-03-28 19:02 ` Randy Dunlap
  2011-03-29 11:53 ` Sergei Shtylyov
  0 siblings, 2 replies; 3+ messages in thread
From: tmarri @ 2011-03-28 18:28 UTC (permalink / raw)
  To: linux-usb, linuxppc-dev; +Cc: tmarri, greg, Mark Miesfeld, Fushen Chen

From: Tirumala Marri <tmarri@apm.com>

Enable gadget support

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/usb/gadget/Kconfig        |   22 ++++++++++++++++++++++
 drivers/usb/gadget/gadget_chips.h |    9 +++++++++
 2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index bc5123c..61aca75 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -365,6 +365,28 @@ config USB_GADGET_MUSB_HDRC
 	  This OTG-capable silicon IP is used in dual designs including
 	  the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin
 
+# dwc_otg builds in ../dwc_otg along with host support
+config USB_GADGET_DWC_HDRC
+	boolean "DesignWare USB Peripheral"
+	depends on DWC_OTG_MODE || DWC_DEVICE_ONLY
+	select USB_GADGET_DUALSPEED
+	select USB_GADGET_SELECTED
+	select USB_GADGET_DWC_OTG
+	help
+	This OTG-capable Designware USB IP
+
+config USB_GADGET_DWC_OTG
+	boolean "OTG Support"
+	depends on USB_GADGET_DWC_HDRC
+	help
+	The most notable feature of USB OTG is support for a
+	"Dual-Role" device, which can act as either a device
+	or a host.  The initial role choice can be changed
+	later, when two dual-role devices talk to each other.
+	Select this only if your board has a Mini-AB connector.
+
+
+
 config USB_GADGET_M66592
 	boolean "Renesas M66592 USB Peripheral Controller"
 	select USB_GADGET_DUALSPEED
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index e896f63..d1fab43 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -136,6 +136,12 @@
 #define gadget_is_s3c_hsotg(g)    0
 #endif
 
+#if defined(CONFIG_DWC_OTG_MODE) || defined(CONFIG_DWC_DEVICE_ONLY)
+#define gadget_is_dwc_otg_pcd(g)	(!strcmp("dwc_otg_pcd", (g)->name))
+#else
+#define gadget_is_dwc_otg_pcd(g)	0
+#endif
+
 #ifdef CONFIG_USB_GADGET_EG20T
 #define	gadget_is_pch(g)	(!strcmp("pch_udc", (g)->name))
 #else
@@ -207,6 +213,9 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
 		return 0x27;
 	else if (gadget_is_ci13xxx_msm(gadget))
 		return 0x28;
+	else if (gadget_is_dwc_otg_pcd(gadget))
+		return 0x29;
+
 	return -ENOENT;
 }
 
-- 
1.6.1.rc3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support
  2011-03-28 18:28 [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support tmarri
@ 2011-03-28 19:02 ` Randy Dunlap
  2011-03-29 11:53 ` Sergei Shtylyov
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2011-03-28 19:02 UTC (permalink / raw)
  To: tmarri; +Cc: Mark Miesfeld, greg, linux-usb, linuxppc-dev, Fushen Chen


> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index bc5123c..61aca75 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -365,6 +365,28 @@ config USB_GADGET_MUSB_HDRC
>  	  This OTG-capable silicon IP is used in dual designs including
>  	  the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin
>  
> +# dwc_otg builds in ../dwc_otg along with host support
> +config USB_GADGET_DWC_HDRC
> +	boolean "DesignWare USB Peripheral"
> +	depends on DWC_OTG_MODE || DWC_DEVICE_ONLY
> +	select USB_GADGET_DUALSPEED
> +	select USB_GADGET_SELECTED
> +	select USB_GADGET_DWC_OTG
> +	help
> +	This OTG-capable Designware USB IP

missing complete help text.

> +
> +config USB_GADGET_DWC_OTG
> +	boolean "OTG Support"
> +	depends on USB_GADGET_DWC_HDRC
> +	help
> +	The most notable feature of USB OTG is support for a
> +	"Dual-Role" device, which can act as either a device
> +	or a host.  The initial role choice can be changed
> +	later, when two dual-role devices talk to each other.
> +	Select this only if your board has a Mini-AB connector.
> +
> +
> +
>  config USB_GADGET_M66592
>  	boolean "Renesas M66592 USB Peripheral Controller"
>  	select USB_GADGET_DUALSPEED


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support
  2011-03-28 18:28 [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support tmarri
  2011-03-28 19:02 ` Randy Dunlap
@ 2011-03-29 11:53 ` Sergei Shtylyov
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2011-03-29 11:53 UTC (permalink / raw)
  To: tmarri; +Cc: Mark Miesfeld, greg, linux-usb, linuxppc-dev, Fushen Chen

Hello.

On 28-03-2011 22:28, tmarri@apm.com wrote:

> From: Tirumala Marri <tmarri@apm.com>

> Enable gadget support

> 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>
[...]

> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index bc5123c..61aca75 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -365,6 +365,28 @@ config USB_GADGET_MUSB_HDRC
>   	  This OTG-capable silicon IP is used in dual designs including
>   	  the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin
>
> +# dwc_otg builds in ../dwc_otg along with host support

    There's no ../dwc_otg any longer.

> +config USB_GADGET_DWC_HDRC
> +	boolean "DesignWare USB Peripheral"
> +	depends on DWC_OTG_MODE || DWC_DEVICE_ONLY
> +	select USB_GADGET_DUALSPEED
> +	select USB_GADGET_SELECTED
> +	select USB_GADGET_DWC_OTG
> +	help
> +	This OTG-capable Designware USB IP
> +
> +config USB_GADGET_DWC_OTG
> +	boolean "OTG Support"
> +	depends on USB_GADGET_DWC_HDRC

    Not on DWC_OTG_MODE? How this option is different from DWC_OTG_MODE?

> +	help
> +	The most notable feature of USB OTG is support for a
> +	"Dual-Role" device, which can act as either a device
> +	or a host.  The initial role choice can be changed
> +	later, when two dual-role devices talk to each other.
> +	Select this only if your board has a Mini-AB connector.
> +
> +
> +

     Too many empty lines.

>   config USB_GADGET_M66592
>   	boolean "Renesas M66592 USB Peripheral Controller"
>   	select USB_GADGET_DUALSPEED

WBR, Sergei

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-29 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 18:28 [PATCH v10 09/10] USB/ppc4xx:Synopsys DWC OTG driver enable gadget support tmarri
2011-03-28 19:02 ` Randy Dunlap
2011-03-29 11:53 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).