aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorGraeme Gregory <dp@xora.org.uk>2010-04-21 11:37:53 +0100
committerGraeme Gregory <dp@xora.org.uk>2010-04-21 11:37:53 +0100
commitcb025b960eb52ad834b3df588d8352d071b863b6 (patch)
treed2250d04e93f96e9ecbe9373ff6f792c9e464fa1 /recipes
parent188d4e13e053a9ced622469332e111d2460817a6 (diff)
downloadopenembedded-cb025b960eb52ad834b3df588d8352d071b863b6.tar.gz
linux-omap-zoomsync_2.6.32.bb : OTG support without gadget
Taken from linux-omap-psp patches, makes zoom2 much more user friendly
Diffstat (limited to 'recipes')
-rw-r--r--recipes/linux/linux-omap-zoomsync-2.6.32/0042-musb-allow-host-io-without-gadget-module.patch90
-rw-r--r--recipes/linux/linux-omap-zoomsync_2.6.32.bb12
2 files changed, 97 insertions, 5 deletions
diff --git a/recipes/linux/linux-omap-zoomsync-2.6.32/0042-musb-allow-host-io-without-gadget-module.patch b/recipes/linux/linux-omap-zoomsync-2.6.32/0042-musb-allow-host-io-without-gadget-module.patch
new file mode 100644
index 0000000000..5e6a0e2f1c
--- /dev/null
+++ b/recipes/linux/linux-omap-zoomsync-2.6.32/0042-musb-allow-host-io-without-gadget-module.patch
@@ -0,0 +1,90 @@
+From 856e80e1411ff5fad939545b0b7d2c50676ce5c9 Mon Sep 17 00:00:00 2001
+From: Ajay Kumar Gupta <ajay.gupta@ti.com>
+Date: Wed, 14 Apr 2010 16:08:37 +0530
+Subject: [PATCH 42/43] musb: allow host io without gadget module
+
+Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
+---
+ drivers/usb/musb/musb_core.c | 14 +++++++++-----
+ drivers/usb/musb/musb_gadget.c | 26 --------------------------
+ 2 files changed, 9 insertions(+), 31 deletions(-)
+
+diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
+index 2c1400f..a80e9f9 100644
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -2101,10 +2101,12 @@ bad_config:
+ * (We expect the ID pin to be forcibly grounded!!)
+ * Otherwise, wait till the gadget driver hooks up.
+ */
+- if (!is_otg_enabled(musb) && is_host_enabled(musb)) {
+- MUSB_HST_MODE(musb);
+- musb->xceiv->default_a = 1;
+- musb->xceiv->state = OTG_STATE_A_IDLE;
++ if (is_host_enabled(musb)) {
++ if (!is_otg_enabled(musb)) {
++ MUSB_HST_MODE(musb);
++ musb->xceiv->default_a = 1;
++ musb->xceiv->state = OTG_STATE_A_IDLE;
++ }
+
+ status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
+
+@@ -2115,7 +2117,9 @@ bad_config:
+ & MUSB_DEVCTL_BDEVICE
+ ? 'B' : 'A'));
+
+- } else /* peripheral is enabled */ {
++ }
++ /* peripheral is enabled */
++ if (is_peripheral_enabled(musb)) {
+ MUSB_DEV_MODE(musb);
+ musb->xceiv->default_a = 0;
+ musb->xceiv->state = OTG_STATE_B_IDLE;
+diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
+index 1c3610b..d75db21 100644
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -1752,24 +1752,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
+ otg_set_peripheral(musb->xceiv, &musb->g);
+
+ spin_unlock_irqrestore(&musb->lock, flags);
+-
+- if (is_otg_enabled(musb)) {
+- DBG(3, "OTG startup...\n");
+-
+- /* REVISIT: funcall to other code, which also
+- * handles power budgeting ... this way also
+- * ensures HdrcStart is indirectly called.
+- */
+- retval = usb_add_hcd(musb_to_hcd(musb), -1, 0);
+- if (retval < 0) {
+- DBG(1, "add_hcd failed, %d\n", retval);
+- spin_lock_irqsave(&musb->lock, flags);
+- otg_set_peripheral(musb->xceiv, NULL);
+- musb->gadget_driver = NULL;
+- musb->g.dev.driver = NULL;
+- spin_unlock_irqrestore(&musb->lock, flags);
+- }
+- }
+ }
+
+ return retval;
+@@ -1865,14 +1847,6 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+ retval = -EINVAL;
+ spin_unlock_irqrestore(&musb->lock, flags);
+
+- if (is_otg_enabled(musb) && retval == 0) {
+- usb_remove_hcd(musb_to_hcd(musb));
+- /* FIXME we need to be able to register another
+- * gadget driver here and have everything work;
+- * that currently misbehaves.
+- */
+- }
+-
+ return retval;
+ }
+ EXPORT_SYMBOL(usb_gadget_unregister_driver);
+--
+1.6.6.1
+
diff --git a/recipes/linux/linux-omap-zoomsync_2.6.32.bb b/recipes/linux/linux-omap-zoomsync_2.6.32.bb
index b869a8881c..8c556fb789 100644
--- a/recipes/linux/linux-omap-zoomsync_2.6.32.bb
+++ b/recipes/linux/linux-omap-zoomsync_2.6.32.bb
@@ -14,7 +14,7 @@ SRCREV_omapzoom2 = "015cbaf1035cd9a61d33a27de2a22902555db3c5"
SRCREV_omapzoom36x = "2e3c681c6228de2a3f8fbb0cfbc940e7ea825a09"
-OEV = "oe6"
+OEV = "oe7"
PE = "1"
# The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc
@@ -25,14 +25,16 @@ PR_append = "+gitr${SRCREV}"
SRC_URI_omapzoom2 = "git://dev.omapzoom.org/pub/scm/integration/kernel-omap3.git;branch=master;protocol=git \
+ file://0042-musb-allow-host-io-without-gadget-module.patch;patch=1 \
file://rev.patch;patch=1 \
- file://logo_linux_clut224.ppm \
- file://defconfig"
+ file://logo_linux_clut224.ppm \
+ file://defconfig"
SRC_URI_omapzoom36x = "git://dev.omapzoom.org/pub/scm/integration/kernel-omap3.git;branch=L23.I3.3;protocol=git \
+ file://0042-musb-allow-host-io-without-gadget-module.patch;patch=1 \
file://rev.patch;patch=1 \
- file://logo_linux_clut224.ppm \
- file://defconfig"
+ file://logo_linux_clut224.ppm \
+ file://defconfig"
SRC_URI_append = " \
"