Commit 7e4bab53 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Enable host DMA for tusb6010

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: default avatarTony Lindgren <tony@atomide.com>
parent 5d5380ba
......@@ -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
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment