From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] musb_hdrc: Enable host DMA for tusb6010
Date: Fri, 4 May 2007 10:05:18 -0700 [thread overview]
Message-ID: <20070504170518.GG12331@atomide.com> (raw)
In-Reply-To: <11782105223370-git-send-email-tony@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
* Tony Lindgren <tony@atomide.com> [070503 09:42]:
> This patch allows host to try to use DMA on tusb6010.
Here's an updated version of this to fix the compile
problem Kevin pointed out on non-tusb systems.
Tony
[-- Attachment #2: 0002-musb_hdrc-Enable-host-DMA-for-tusb6010.txt --]
[-- Type: text/plain, Size: 1673 bytes --]
>From cac0b797100c284366305471b8d12ca7daa73861 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
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 <tony@atomide.com>
---
drivers/usb/musb/musb_host.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
--- 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
#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
/* kick things off */
- if (is_cppi_enabled()) {
+ if ((is_cppi_enabled() || tusb_dma_omap()) && pDmaChannel) {
/* candidate for DMA */
if (pDmaChannel) {
pDmaChannel->dwActualLength = 0L;
--- 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
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2007-05-04 17:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-03 16:41 [PATCH 0/7] musb/tusb6010 fixes for host mode Tony Lindgren
2007-05-03 16:41 ` [PATCH] MUSB_HDRC: Allow selecting OTG, peripheral or host mode via sysfs Tony Lindgren
2007-05-03 16:41 ` [PATCH] musb_hdrc: Enable host DMA for tusb6010 Tony Lindgren
2007-05-03 16:41 ` [PATCH] musb_hdrc: Allow tusb dma to transfer various data sizes Tony Lindgren
2007-05-03 16:41 ` [PATCH] musb_hdrc: Transfer remaining bytes with PIO Tony Lindgren
2007-05-03 16:41 ` [PATCH] musb_hdrc: DMA RX workaround for tusb6010 Tony Lindgren
2007-05-03 16:41 ` [PATCH] musb_hdrc: Stop host session on BABBLE Tony Lindgren
2007-05-03 16:41 ` [PATCH] musb_hdrc: Avoid host babble by checking tx fifo Tony Lindgren
2007-05-03 18:43 ` [PATCH] musb_hdrc: Clean-up TUSB fifo access Tony Lindgren
2007-05-04 17:05 ` Tony Lindgren [this message]
2007-05-04 16:22 ` [PATCH 0/7] musb/tusb6010 fixes for host mode Kevin Hilman
2007-05-04 16:48 ` Tony Lindgren
2007-05-04 17:01 ` Tony Lindgren
2007-05-04 17:17 ` Kevin Hilman
2007-05-04 17:22 ` Tony Lindgren
2007-05-04 17:26 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070504170518.GG12331@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox