]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/gadget/omap_udc.c
h63xx: nfs mount works, gpe image boots to ts config screen.
[linux-2.6-omap-h63xx.git] / drivers / usb / gadget / omap_udc.c
index bb54cca4c54381736ead413cec0e3747e4af9b78..b4c6b9778a1d7beaa81aaf48301e7aa9ccd95c70 100644 (file)
 #undef USB_TRACE
 
 /* bulk DMA seems to be behaving for both IN and OUT */
+#ifdef CONFIG_MACH_OMAP_H6300
+#undef USE_DMA
+//#define      USE_DMA
+#else
 #define        USE_DMA
+#endif
 
 /* ISO too */
 #define        USE_ISO
@@ -2098,6 +2103,7 @@ static inline int machine_without_vbus_sense(void)
                || machine_is_omap_h4()
 #endif
                || machine_is_sx1()
+               || machine_is_omap_h6300()
                );
 }
 
@@ -2313,6 +2319,13 @@ static int proc_otg_show(struct seq_file *s)
 
        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 {
@@ -2999,7 +3012,7 @@ cleanup1:
 
 cleanup0:
        if (xceiv)
-               put_device(xceiv->dev);
+               otg_put_transceiver(xceiv);
 
        if (cpu_is_omap16xx() || cpu_is_omap24xx()) {
                clk_disable(hhc_clk);
@@ -3027,7 +3040,7 @@ static int __exit omap_udc_remove(struct platform_device *pdev)
 
        pullup_disable(udc);
        if (udc->transceiver) {
-               put_device(udc->transceiver->dev);
+               otg_put_transceiver(udc->transceiver);
                udc->transceiver = NULL;
        }
        omap_writew(0, UDC_SYSCON1);