From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 6/6] musb: dma: use optimal transfer element for sdma
Date: Tue, 18 May 2010 13:47:49 +0400 [thread overview]
Message-ID: <4BF26245.4070707@ru.mvista.com> (raw)
In-Reply-To: <1274094488-15925-6-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
Hello.
Ajay Kumar Gupta wrote:
> Use optimal values of transfer element based on buffer address in system
> DMA programming. This would improve the performance.
>
> Signed-off-by: Ajay Kumar Gupta <ajay.gupta-l0cyMroinI0@public.gmane.org>
> ---
> drivers/usb/musb/musbhsdma.c | 29 ++++++++++++++++++++++++++---
> 1 files changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c
> index d29e487..39c1801 100644
> --- a/drivers/usb/musb/musbhsdma.c
> +++ b/drivers/usb/musb/musbhsdma.c
> @@ -52,11 +52,34 @@ static void musb_sdma_channel_program(struct musb *musb,
> struct musb_dma_channel *musb_channel,
> dma_addr_t dma_addr, u32 len)
> {
> + u16 frame = len;
> + int data_type = OMAP_DMA_DATA_TYPE_S8;
> +
> + switch (dma_addr & 0x3) {
> + case 0:
> + if ((len % 4) == 0) {
> + data_type = OMAP_DMA_DATA_TYPE_S32;
> + frame = len / 4;
> + break;
> + }
> + case 2:
> + if ((len % 2) == 0) {
> + data_type = OMAP_DMA_DATA_TYPE_S16;
> + frame = len / 2;
> + break;
> + }
> + case 1:
> + case 3:
> + default:
> + data_type = OMAP_DMA_DATA_TYPE_S8;
> + frame = len;
> + break;
The *break* is overindented.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-05-18 9:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 11:08 [PATCH 1/6] musb: save OTG base physical address Ajay Kumar Gupta
2010-05-17 11:08 ` [PATCH 2/6 v2] musb: use system DMA to fix Inventra DMA issue on RTL-1.4 Ajay Kumar Gupta
[not found] ` <1274094488-15925-2-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-05-17 11:08 ` [PATCH 3/6] musb: add function to check if Inventra DMA used Ajay Kumar Gupta
2010-05-17 11:08 ` [PATCH 4/6] musb: use system DMA for unaligned buffers on RTL >= 1.8 Ajay Kumar Gupta
[not found] ` <1274094488-15925-4-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-05-17 11:08 ` [PATCH 5/6] musb: gadget: fix tx transfer path for mode0 operation Ajay Kumar Gupta
[not found] ` <1274094488-15925-5-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-05-17 11:08 ` [PATCH 6/6] musb: dma: use optimal transfer element for sdma Ajay Kumar Gupta
[not found] ` <1274094488-15925-6-git-send-email-ajay.gupta-l0cyMroinI0@public.gmane.org>
2010-05-18 9:47 ` Sergei Shtylyov [this message]
2010-05-18 10:11 ` Gupta, Ajay Kumar
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=4BF26245.4070707@ru.mvista.com \
--to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
--cc=ajay.gupta-l0cyMroinI0@public.gmane.org \
--cc=felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.