]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Enable host DMA for tusb6010
authorTony Lindgren <tony@atomide.com>
Tue, 6 Feb 2007 23:41:54 +0000 (15:41 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 4 May 2007 17:06:03 +0000 (10:06 -0700)
This patch allows host to try to use DMA on tusb6010.

Please note that until tusb6010 DMA size limitations
are fixed, DMA happens with host side rarely.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/dma.h
drivers/usb/musb/musb_host.c

index cececd9c28525d8c90d8f36d69127052b15790ca..8aecd7a3cd327757a516194af2273146b0c3091e 100644 (file)
@@ -73,6 +73,11 @@ struct musb_hw_ep;
 #define        is_cppi_enabled()       0
 #endif
 
+#ifdef CONFIG_USB_TUSB_OMAP_DMA
+#define tusb_dma_omap()                        1
+#else
+#define tusb_dma_omap()                        0
+#endif
 
 /*
  * DMA channel status ... updated by the dma controller driver whenever that
index ef473e9c9fd1d5ee9989ba674f721350141f9441..440df48c91db19ddf0f7e04413bf8f4d7bb66b21 100644 (file)
@@ -236,7 +236,7 @@ start:
 
                if (!pEnd->tx_channel)
                        musb_h_tx_start(pEnd);
-               else if (is_cppi_enabled())
+               else if (is_cppi_enabled() || tusb_dma_omap())
                        cppi_host_txdma_start(pEnd);
        }
 }
@@ -806,7 +806,7 @@ static void musb_ep_program(struct musb *pThis, u8 bEnd,
 #endif
 
                /* candidate for DMA */
-               if (is_cppi_enabled() && pDmaChannel) {
+               if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) {
 
                        /* program endpoint CSRs first, then setup DMA.
                         * assume CPPI setup succeeds.
@@ -897,7 +897,7 @@ static void musb_ep_program(struct musb *pThis, u8 bEnd,
 
                /* kick things off */
 
-               if (is_cppi_enabled()) {
+               if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) {
                        /* candidate for DMA */
                        if (pDmaChannel) {
                                pDmaChannel->dwActualLength = 0L;