]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/omap_udc.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / omap_udc.c
index e6d68bda428a850d6d98ac05d06abf83aa604b18..699ff42ff6d7d37398da45b6e755a4ea2c589b8e 100644 (file)
@@ -54,6 +54,7 @@
 
 #include <asm/arch/dma.h>
 #include <asm/arch/usb.h>
+#include <asm/arch/control.h>
 
 #include "omap_udc.h"
 
@@ -2290,8 +2291,15 @@ static int proc_otg_show(struct seq_file *s)
 
        tmp = OTG_REV_REG;
        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_REG on OMAP1,
+                * but with CONTROL_DEVCONF, these bits have something to
+                * do with the frame adjustment counter and McBSP2.
+                */
                ctrl_name = "control_devconf";
-               trans = CONTROL_DEVCONF_REG;
+               trans = omap_ctrl_readb(OMAP2_CONTROL_DEVCONF0);
        } else {
                ctrl_name = "tranceiver_ctrl";
                trans = USB_TRANSCEIVER_CTRL_REG;
@@ -2577,7 +2585,9 @@ omap_ep_setup(char *name, u8 addr, u8 type,
                 * 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) {
@@ -3109,4 +3119,4 @@ module_exit(udc_exit);
 
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
-
+MODULE_ALIAS("platform:omap_udc");