summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-04-14 13:39:04 +0200
committerKoen Kooi <koen@openembedded.org>2010-04-14 15:44:21 +0200
commit7bf615ec79c90c5d4151dccff3c137d93350e669 (patch)
treef648a9b1694b51709fdbc3d9237ccfd2d0651cf2
parent4a7696ac44b77bda491b138474491773cd837590 (diff)
linux-omap-psp 2.6.32: add patch to allow OTG port to detect host cables with a gadget loaded
-rw-r--r--recipes/linux/linux-omap-psp-2.6.32/0042-musb-allow-host-io-without-gadget-module.patch90
-rw-r--r--recipes/linux/linux-omap-psp_2.6.32.bb5
2 files changed, 93 insertions, 2 deletions
diff --git a/recipes/linux/linux-omap-psp-2.6.32/0042-musb-allow-host-io-without-gadget-module.patch b/recipes/linux/linux-omap-psp-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-psp-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-psp_2.6.32.bb b/recipes/linux/linux-omap-psp_2.6.32.bb
index e504eaa3a9..ebed380612 100644
--- a/recipes/linux/linux-omap-psp_2.6.32.bb
+++ b/recipes/linux/linux-omap-psp_2.6.32.bb
@@ -5,8 +5,8 @@ KERNEL_IMAGETYPE = "uImage"
COMPATIBLE_MACHINE = "beagleboard|omap3evm|am3517-evm|omap3-touchbook|overo"
-# This tag is v2.6.32_OMAPPSP_03.00.00.05
-SRCREV = "da0c86a8f3bd57fad0ccd05eb1b5e3326d7f36aa"
+# This is the v2.6.32_OMAPPSP_03.00.00.05 branch
+SRCREV = "7b8926aa626991fa087b00f6bbc1fb6b0e8269b0"
# The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc
MACHINE_KERNEL_PR_append = "+gitr${SRCREV}"
@@ -53,6 +53,7 @@ SRC_URI = "git://arago-project.org/git/people/sriram/ti-psp-omap.git;protocol=gi
file://0039-ARM-Add-option-to-allow-userspace-PLE-access.patch;patch=1 \
file://0040-ARM-Add-option-to-allow-userspace-access-to-performa.patch;patch=1 \
file://0041-ARM-Expose-some-PMON-registers-through-sysfs.patch;patch=1 \
+ file://0042-musb-allow-host-io-without-gadget-module.patch;patch=1 \
file://defconfig"
SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \