From 7e4bab5307074d2e404fb86338198360316af9b8 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 6 Feb 2007 15:41:54 -0800 Subject: [PATCH] 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: Tony Lindgren --- drivers/usb/musb/dma.h | 5 +++++ drivers/usb/musb/musb_host.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/dma.h b/drivers/usb/musb/dma.h index cececd9c285..8aecd7a3cd3 100644 --- a/drivers/usb/musb/dma.h +++ b/drivers/usb/musb/dma.h @@ -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 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index ef473e9c9fd..440df48c91d 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -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; -- 2.41.1