Skip to contentSkip to conversation

Git tree updated to v2.6.27-rc5, some USB diffs still lurking

PATCH Tony Lindgren 5 participants 9 messages Sep 3, 2008 – Sep 5, 2008

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

Hi all,

I've updated our git tree to -rc5. Now drivers/usb is pretty close to being in sync with mainline except for the following diff.

Dave, could you take a look at the following USB patch and see what should be merged, fixed or removed?

The patch is mostly some ehci-omap.[ch] and musb include fixes. And then there are also the H4 OTG patches from Imre still floating on this list.

Regards,

Tony

drivers/usb/gadget/Kconfig +1 -1
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/gadget/Kconfig ./drivers/usb/gadget/Kconfig
@@ -297,7 +297,7 @@
 config USB_GADGET_OMAP
 	boolean "OMAP USB Device Controller"
 	depends on ARCH_OMAP
-	select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+	select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
 	help
 	   Many Texas Instruments OMAP processors have flexible full
 	   speed USB device controllers, with support for up to 30
drivers/usb/gadget/omap_udc.c +11 -2
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/gadget/omap_udc.c ./drivers/usb/gadget/omap_udc.c
@@ -2313,6 +2313,13 @@
 
 	tmp = omap_readl(OTG_REV);
 	if (cpu_is_omap24xx()) {
+		/*
+		 * REVISIT: Not clear how this works on OMAP2.  trans
+		 * is ANDed to produce bits 7 and 8, which might make
+		 * sense for USB_TRANSCEIVER_CTRL on OMAP1,
+		 * but with CONTROL_DEVCONF, these bits have something to
+		 * do with the frame adjustment counter and McBSP2.
+		 */
 		ctrl_name = "control_devconf";
 		trans = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
 	} else {
@@ -2597,7 +2604,9 @@
 		 * and ignored for PIO-IN on newer chips
 		 * (for more reliable behavior)
 		 */
-		if (!use_dma || cpu_is_omap15xx() || cpu_is_omap24xx())
+		if ((!use_dma && (addr & USB_DIR_IN))
+				|| machine_is_omap_apollon()
+				|| cpu_is_omap15xx())
 			dbuf = 0;
 
 		switch (maxp) {
@@ -2687,7 +2696,7 @@
 	udc->gadget.name = driver_name;
 
 	device_initialize(&udc->gadget.dev);
-	dev_set_name(&udc->gadget.dev, "gadget");
+	strcpy (udc->gadget.dev.bus_id, "gadget");
 	udc->gadget.dev.release = omap_udc_release;
 	udc->gadget.dev.parent = &odev->dev;
 	if (use_dma)
drivers/usb/host/ehci-hcd.c +5 -0
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/host/ehci-hcd.c ./drivers/usb/host/ehci-hcd.c
@@ -1009,6 +1009,11 @@
 #define	PLATFORM_DRIVER		ehci_hcd_au1xxx_driver
 #endif
 
+#ifdef CONFIG_ARCH_OMAP34XX
+#include "ehci-omap.c"
+#define	PLATFORM_DRIVER		ehci_hcd_omap_driver
+#endif
+
 #ifdef CONFIG_PPC_PS3
 #include "ehci-ps3.c"
 #define	PS3_SYSTEM_BUS_DRIVER	ps3_ehci_driver
drivers/usb/host/ehci-omap.c +562 -0

562 lines not on this page · raw message

drivers/usb/host/ehci-omap.h +125 -0

125 lines not on this page · raw message

drivers/usb/host/Kconfig +19 -0
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/host/Kconfig ./drivers/usb/host/Kconfig
@@ -41,6 +41,25 @@
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called ehci-hcd.
+choice
+	prompt "PHY/TLL mode"
+	depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX
+	---help---
+	Choose PHY or TLL mode of operation
+
+config OMAP_EHCI_PHY_MODE
+	bool "PHY mode: ISP1504 on Port1/2 (NEW 3430ES2.0)"
+	depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX
+	---help---
+	  EHCI PHY mode. Port1 and Port2 are connected to ISP1504 transcievers
+
+config OMAP_EHCI_TLL_MODE
+	bool "TLL mode: (EXPERIMENTAL)"
+	depends on USB_EHCI_HCD && EXPERIMENTAL && ARCH_OMAP34XX
+	---help---
+	OMAP EHCI controller has TLL mode of operation for all 3 ports.
+	Use this mode when no transciever is present
+endchoice
 
 config USB_EHCI_ROOT_HUB_TT
 	bool "Root Hub Transaction Translators"
drivers/usb/host/ohci-omap.c +2 -2
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/host/ohci-omap.c ./drivers/usb/host/ohci-omap.c
@@ -231,7 +231,7 @@
 
 	omap_ohci_clock_power(1);
 
-	if (cpu_is_omap1510()) {
+	if (cpu_is_omap15xx()) {
 		omap_1510_local_bus_power(1);
 		omap_1510_local_bus_init();
 	}
@@ -319,7 +319,7 @@
 	if (IS_ERR(usb_host_ck))
 		return PTR_ERR(usb_host_ck);
 
-	if (!cpu_is_omap1510())
+	if (!cpu_is_omap15xx())
 		usb_dc_ck = clk_get(0, "usb_dc_ck");
 	else
 		usb_dc_ck = clk_get(0, "lb_ck");
drivers/usb/Kconfig +1 -0
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/Kconfig ./drivers/usb/Kconfig
@@ -55,6 +55,7 @@
 	default y if PPC_83xx
 	default y if SOC_AU1200
 	default y if ARCH_IXP4XX
+	default y if ARCH_OMAP34XX
 	default PCI
 
 # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface.
drivers/usb/musb/davinci.c +4 -4
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/musb/davinci.c ./drivers/usb/musb/davinci.c
@@ -31,15 +31,15 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 
-#include <asm/arch/hardware.h>
-#include <asm/arch/memory.h>
-#include <asm/arch/gpio.h>
+#include <mach/hardware.h>
+#include <mach/memory.h>
+#include <mach/gpio.h>
 #include <asm/mach-types.h>
 
 #include "musb_core.h"
 
 #ifdef CONFIG_MACH_DAVINCI_EVM
-#include <asm/arch/i2c-client.h>
+#include <mach/i2c-client.h>
 #endif
 
 #include "davinci.h"
drivers/usb/musb/musb_core.c +2 -2
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/musb/musb_core.c ./drivers/usb/musb/musb_core.c
@@ -100,8 +100,8 @@
 #include <linux/io.h>
 
 #ifdef	CONFIG_ARM
-#include <asm/arch/hardware.h>
-#include <asm/arch/memory.h>
+#include <mach/hardware.h>
+#include <mach/memory.h>
 #include <asm/mach-types.h>
 #endif
 
drivers/usb/musb/omap2430.c +2 -2
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/musb/omap2430.c ./drivers/usb/musb/omap2430.c
@@ -35,8 +35,8 @@
 #include <linux/io.h>
 
 #include <asm/mach-types.h>
-#include <asm/arch/hardware.h>
-#include <asm/arch/mux.h>
+#include <mach/hardware.h>
+#include <mach/mux.h>
 
 #include "musb_core.h"
 #include "omap2430.h"
drivers/usb/musb/omap2430.h +2 -2
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/musb/omap2430.h ./drivers/usb/musb/omap2430.h
@@ -11,8 +11,8 @@
 #define __MUSB_OMAP243X_H__
 
 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
-#include <asm/arch/hardware.h>
-#include <asm/arch/usb.h>
+#include <mach/hardware.h>
+#include <mach/usb.h>
 
 /*
  * OMAP2430-specific definitions
drivers/usb/musb/tusb6010_omap.c +2 -2
diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/musb/tusb6010_omap.c ./drivers/usb/musb/tusb6010_omap.c
@@ -15,8 +15,8 @@
 #include <linux/usb.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-#include <asm/arch/dma.h>
-#include <asm/arch/mux.h>
+#include <mach/dma.h>
+#include <mach/mux.h>
 
 #include "musb_core.h"
 
#1 lore raw
Quoted 11 lines · Tony Lindgren

Hi all,

I've updated our git tree to -rc5. Now drivers/usb is pretty close to being in sync with mainline except for the following diff.

Dave, could you take a look at the following USB patch and see what should be merged, fixed or removed?

The patch is mostly some ehci-omap.[ch] and musb include fixes. And then there are also the H4 OTG patches from Imre still floating on this list.

The musb part I sent to Greg already, you should get on -rc6. Here's the link on linux-usb archive:

http://marc.info/?l=linux-usb&m=122011455015140&w=2

Signature · 1 line
balbi
#2 lore raw
Quoted 9 lines · Felipe Balbi
Quoted 8 lines · Tony Lindgren

Hi all,

I've updated our git tree to -rc5. Now drivers/usb is pretty close to being in sync with mainline except for the following diff.

Dave, could you take a look at the following USB patch and see what should be merged, fixed or removed?

Quoted 8 lines
Quoted 3 lines

The patch is mostly some ehci-omap.[ch] and musb include fixes. And then there are also the H4 OTG patches from Imre still floating on this list.

The musb part I sent to Greg already, you should get on -rc6. Here's the link on linux-usb archive:

http://marc.info/?l=linux-usb&m=122011455015140&w=2

OK thanks.

Vikram and Nishant, can you send your ehci-omap patches to linux-usb for integration?

Tony

#3 lore raw
In reply to Tony Lindgren

drivers/usb/gadget/omap_udc.c line 2699

Quoted 6 lines · Tony Lindgren
drivers/usb/gadget/omap_udc.c +1 -1
@@ -2687,7 +2696,7 @@
 	udc->gadget.name = driver_name;
 
 	device_initialize(&udc->gadget.dev);
-	dev_set_name(&udc->gadget.dev, "gadget");
+	strcpy (udc->gadget.dev.bus_id, "gadget");

FWIW, this one looks like a mismerge with the change converting direct accesses to dev.bus_id to use accessors.

drivers/usb/host/ehci-omap.c line 560

Quoted 10 lines
drivers/usb/host/ehci-omap.c +10 -0
+MODULE_ALIAS("omap-ehci");
+static struct platform_driver ehci_hcd_omap_driver = {
+	.probe = ehci_hcd_omap_drv_probe,
+	.remove = ehci_hcd_omap_drv_remove,
+	.shutdown = usb_hcd_platform_shutdown,
+	/*.suspend      = ehci_hcd_omap_drv_suspend, */
+	/*.resume       = ehci_hcd_omap_drv_resume, */
+	.driver = {
+		.name = "ehci-omap",
+		.bus = &platform_bus_type

No need to set .bus.

drivers/usb/host/ehci-omap.h line 28

Quoted 6 lines
drivers/usb/host/ehci-omap.h +6 -0
+#ifndef __EHCI_OMAP_H
+#define __EHCI_OMAP_H
+
+#include <mach/hardware.h>
+#include "../../../arch/arm/mach-omap2/cm.h"
+#include "../../../arch/arm/mach-omap2/cm-regbits-34xx.h"

Such includes need to die.

drivers/usb/host/ehci-omap.h line 43

Quoted 5 lines
drivers/usb/host/ehci-omap.h +5 -0
+#define	OMAP_USBHOST_TLL_BASE	(OMAP_USBHOST_BASE + 0x2000)
+#define	OMAP_USBTLL_REVISION	(OMAP_USBHOST_TLL_BASE + 0x00)
+#define	OMAP_USBTLL_SYSCONFIG	(OMAP_USBHOST_TLL_BASE + 0x10)
+	#define	OMAP_USBTLL_SYSCONFIG_CACTIVITY_SHIFT	8
+	#define	OMAP_USBTLL_SYSCONFIG_SIDLEMODE_SHIFT	3

And, fyi, gcc may currently accept this, but I seem to remember that the C standard doesn't permit this - the '#' should always be in column 0, optionally followed by white space before the directive.

Quoted 1 line

+#include <mach/memory.h>

Should be asm/memory.h (same for all other occurances.)

And some of these asm/arch/ -> mach/ conversions look like missed stuff from the includes move, so should be a high priority to get into the next -rc. Tony: please sort out a patch and put it in my patch system for these.

#4 lore raw
Quoted 10 lines · Russell King - ARM Linux

drivers/usb/gadget/omap_udc.c line 2699

Quoted 6 lines · Tony Lindgren
drivers/usb/gadget/omap_udc.c +1 -1
@@ -2687,7 +2696,7 @@
 	udc->gadget.name = driver_name;
 
 	device_initialize(&udc->gadget.dev);
-	dev_set_name(&udc->gadget.dev, "gadget");
+	strcpy (udc->gadget.dev.bus_id, "gadget");

FWIW, this one looks like a mismerge with the change converting direct accesses to dev.bus_id to use accessors.

OK thanks, fixed in l-o tree to use dev_set_name like mainline kernel does.

Quoted 22 lines

drivers/usb/host/ehci-omap.c line 560

Quoted 10 lines
drivers/usb/host/ehci-omap.c +10 -0
+MODULE_ALIAS("omap-ehci");
+static struct platform_driver ehci_hcd_omap_driver = {
+	.probe = ehci_hcd_omap_drv_probe,
+	.remove = ehci_hcd_omap_drv_remove,
+	.shutdown = usb_hcd_platform_shutdown,
+	/*.suspend      = ehci_hcd_omap_drv_suspend, */
+	/*.resume       = ehci_hcd_omap_drv_resume, */
+	.driver = {
+		.name = "ehci-omap",
+		.bus = &platform_bus_type

No need to set .bus.

drivers/usb/host/ehci-omap.h line 28

Quoted 6 lines
drivers/usb/host/ehci-omap.h +6 -0
+#ifndef __EHCI_OMAP_H
+#define __EHCI_OMAP_H
+
+#include <mach/hardware.h>
+#include "../../../arch/arm/mach-omap2/cm.h"
+#include "../../../arch/arm/mach-omap2/cm-regbits-34xx.h"

Such includes need to die.

Quoted 9 lines

drivers/usb/host/ehci-omap.h line 43

Quoted 5 lines
drivers/usb/host/ehci-omap.h +5 -0
+#define	OMAP_USBHOST_TLL_BASE	(OMAP_USBHOST_BASE + 0x2000)
+#define	OMAP_USBTLL_REVISION	(OMAP_USBHOST_TLL_BASE + 0x00)
+#define	OMAP_USBTLL_SYSCONFIG	(OMAP_USBHOST_TLL_BASE + 0x10)
+	#define	OMAP_USBTLL_SYSCONFIG_CACTIVITY_SHIFT	8
+	#define	OMAP_USBTLL_SYSCONFIG_SIDLEMODE_SHIFT	3

And, fyi, gcc may currently accept this, but I seem to remember that the C standard doesn't permit this - the '#' should always be in column 0, optionally followed by white space before the directive.

Vikram & Nishant, can you please fix the above comments for your echi-omap patch for linux-usb?

Quoted 8 lines
Quoted 1 line

+#include <mach/memory.h>

Should be asm/memory.h (same for all other occurances.)

And some of these asm/arch/ -> mach/ conversions look like missed stuff from the includes move, so should be a high priority to get into the next -rc. Tony: please sort out a patch and put it in my patch system for these.

OK, fixed for l-o tree. Felipe has the include fixes patch in Greg's queue, but looks like that needs updating too. Felipe, can you take care of that?

Thanks,

Tony

#5 lore raw
Quoted 3 lines · Tony Lindgren

OK, fixed for l-o tree. Felipe has the include fixes patch in Greg's queue, but looks like that needs updating too. Felipe, can you take care of that?

Yeah, I had a missing change in tusb6010_omap.c for which I have already sent the patch. Asked Greg to meld in the previous musb patch.

If you were talking about anything else, please point out ;-)

Signature · 1 line
balbi
#6 lore raw
In reply to Russell King - ARM Linux
Quoted 11 lines · Russell King - ARM Linux

drivers/usb/host/ehci-omap.h line 43

Quoted 5 lines · Tony Lindgren
drivers/usb/host/ehci-omap.h +5 -0
+#define	OMAP_USBHOST_TLL_BASE	(OMAP_USBHOST_BASE + 0x2000)
+#define	OMAP_USBTLL_REVISION	(OMAP_USBHOST_TLL_BASE + 0x00)
+#define	OMAP_USBTLL_SYSCONFIG	(OMAP_USBHOST_TLL_BASE + 0x10)
+	#define	OMAP_USBTLL_SYSCONFIG_CACTIVITY_SHIFT	8
+	#define	OMAP_USBTLL_SYSCONFIG_SIDLEMODE_SHIFT	3

And, fyi, gcc may currently accept this, but I seem to remember that the C standard doesn't permit this - the '#' should always be in column 0, optionally followed by white space before the directive.

C99 allows whitespace before the # character. Older versions may have had this restriction; I don't have a copy available.

Signature · 7 lines
Måns Rullgård
[email protected]

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
In reply to Tony Lindgren

Breaking this up into digestible chunks ...

This one for USB gadget. I'll send parts of this upstream now, that seems simplest.

I'll review the patch for ehci-omap separately, when it's submitted. ISTR already commenting that the Kconfig stuff should become a platform_data issue. Until that's all resolved, there's not a real point to more focussed review.

I'll let Felipe deal with the MUSB stuff.

The 15xx() bits in the OHCI glue seem fine, I'll send them too.

- Dave

drivers/usb/gadget/Kconfig 2008-09-03 11:19:58.000000000 -0700 line 300

Quoted 8 lines · Tony Lindgren
drivers/usb/gadget/Kconfig 2008-09-03 11:19:58.000000000 -0700 renamed from drivers/usb/gadget/Kconfig 2008-09-01 11:13:34.000000000 -0700 +1 -1
@@ -297,7 +297,7 @@
 config USB_GADGET_OMAP
        boolean "OMAP USB Device Controller"
        depends on ARCH_OMAP
-       select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+       select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG

fine ...

Quoted 7 lines
drivers/usb/gadget/Kconfig 2008-09-03 11:19:58.000000000 -0700 renamed from drivers/usb/gadget/Kconfig 2008-09-01 11:13:34.000000000 -0700 +0 -0
        help
           Many Texas Instruments OMAP processors have flexible full
           speed USB device controllers, with support for up to 30

diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/gadget/omap_udc.c ./drivers/usb/gadget/omap_udc.c

drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 line 2322

Quoted 10 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +7 -0
@@ -2313,6 +2313,13 @@
 
        tmp = omap_readl(OTG_REV);
        if (cpu_is_omap24xx()) {
+               /*
+                * REVISIT: Not clear how this works on OMAP2.  trans
+                * is ANDed to produce bits 7 and 8, which might make
+                * sense for USB_TRANSCEIVER_CTRL on OMAP1,
+                * but with CONTROL_DEVCONF, these bits have something to
+                * do with the frame adjustment counter and McBSP2.
+                */

ok ... the FAC is, ISTR, there to support hardware synch with isochronous data streams. Linux doesn't use it now.

drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 line 2609

Quoted 11 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +3 -1
                ctrl_name = "control_devconf";
                trans = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
        } else {
@@ -2597,7 +2604,9 @@
                 * and ignored for PIO-IN on newer chips
                 * (for more reliable behavior)
                 */
-               if (!use_dma || cpu_is_omap15xx() || cpu_is_omap24xx())
+               if ((!use_dma && (addr & USB_DIR_IN))
+                               || machine_is_omap_apollon()
+                               || cpu_is_omap15xx())

NAK. The Apollon-specific bit should be done some other way, and whatever silicon issue it's covering up is not specific to that board ...

There is however an issue here. The PIO-IN comment stopped matching the hardware at some point...

drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 line 2699

Quoted 9 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +1 -1
                        dbuf = 0;
 
                switch (maxp) {
@@ -2687,7 +2696,7 @@
        udc->gadget.name = driver_name;
 
        device_initialize(&udc->gadget.dev);
-       dev_set_name(&udc->gadget.dev, "gadget");
+       strcpy (udc->gadget.dev.bus_id, "gadget");

As was previously commented: this regression is a merge goof. NAK.

Quoted 3 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +0 -0
        udc->gadget.dev.release = omap_udc_release;
        udc->gadget.dev.parent = &odev->dev;
        if (use_dma)
#8 lore raw
Quoted 9 lines · David Brownell

Breaking this up into digestible chunks ...

This one for USB gadget. I'll send parts of this upstream now, that seems simplest.

I'll review the patch for ehci-omap separately, when it's submitted. ISTR already commenting that the Kconfig stuff should become a platform_data issue. Until that's all resolved, there's not a real point to more focussed review.

OK, once it's submitted to linux-usb, I'll drop it from l-o.

Quoted 1 line

I'll let Felipe deal with the MUSB stuff.

Sounds like the MUSB fixes are already queued up.

Quoted 1 line

The 15xx() bits in the OHCI glue seem fine, I'll send them too.

Thanks.

Quoted 54 lines

- Dave

drivers/usb/gadget/Kconfig 2008-09-03 11:19:58.000000000 -0700 line 300

Quoted 8 lines · Tony Lindgren
drivers/usb/gadget/Kconfig 2008-09-03 11:19:58.000000000 -0700 renamed from drivers/usb/gadget/Kconfig 2008-09-01 11:13:34.000000000 -0700 +1 -1
@@ -297,7 +297,7 @@
 config USB_GADGET_OMAP
        boolean "OMAP USB Device Controller"
        depends on ARCH_OMAP
-       select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+       select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG

fine ...

Quoted 7 lines
drivers/usb/gadget/Kconfig 2008-09-03 11:19:58.000000000 -0700 renamed from drivers/usb/gadget/Kconfig 2008-09-01 11:13:34.000000000 -0700 +0 -0
        help
           Many Texas Instruments OMAP processors have flexible full
           speed USB device controllers, with support for up to 30

diff -Nru --exclude-from=/home/tmlind/src/dontdiff-tony /home/tmlind/src/kernel/linux-2.6/drivers/usb/gadget/omap_udc.c ./drivers/usb/gadget/omap_udc.c

drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 line 2322

Quoted 10 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +7 -0
@@ -2313,6 +2313,13 @@
 
        tmp = omap_readl(OTG_REV);
        if (cpu_is_omap24xx()) {
+               /*
+                * REVISIT: Not clear how this works on OMAP2.  trans
+                * is ANDed to produce bits 7 and 8, which might make
+                * sense for USB_TRANSCEIVER_CTRL on OMAP1,
+                * but with CONTROL_DEVCONF, these bits have something to
+                * do with the frame adjustment counter and McBSP2.
+                */

ok ... the FAC is, ISTR, there to support hardware synch with isochronous data streams. Linux doesn't use it now.

drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 line 2609

Quoted 11 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +3 -1
                ctrl_name = "control_devconf";
                trans = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
        } else {
@@ -2597,7 +2604,9 @@
                 * and ignored for PIO-IN on newer chips
                 * (for more reliable behavior)
                 */
-               if (!use_dma || cpu_is_omap15xx() || cpu_is_omap24xx())
+               if ((!use_dma && (addr & USB_DIR_IN))
+                               || machine_is_omap_apollon()
+                               || cpu_is_omap15xx())

NAK. The Apollon-specific bit should be done some other way, and whatever silicon issue it's covering up is not specific to that board ...

Quoted 3 lines

There is however an issue here. The PIO-IN comment stopped matching the hardware at some point...

I've dropped this from l-o tree, did not change the comments.

Quoted 6 lines
Quoted 6 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +0 -0
                        dbuf = 0;
 
                switch (maxp) {
@@ -2687,7 +2696,7 @@
        udc->gadget.name = driver_name;
 
Quoted 11 lines

drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 line 2699

Quoted 3 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +1 -1
        device_initialize(&udc->gadget.dev);
-       dev_set_name(&udc->gadget.dev, "gadget");
+       strcpy (udc->gadget.dev.bus_id, "gadget");

As was previously commented: this regression is a merge goof. NAK.

Quoted 3 lines
drivers/usb/gadget/omap_udc.c 2008-09-03 11:32:56.000000000 -0700 renamed from drivers/usb/gadget/omap_udc.c 2008-09-01 11:13:35.000000000 -0700 +0 -0
        udc->gadget.dev.release = omap_udc_release;
        udc->gadget.dev.parent = &odev->dev;
        if (use_dma)

This was already dropped yesterday.

Great, that only leaves the echi-omap patch then! Thanks for your help.

Tony