From patchwork Tue Mar 15 15:24:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mian Yousaf Kaukab X-Patchwork-Id: 580 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:58 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs73595ybj; Tue, 15 Mar 2011 08:26:06 -0700 (PDT) Received: by 10.213.27.14 with SMTP id g14mr2263219ebc.92.1300202765001; Tue, 15 Mar 2011 08:26:05 -0700 (PDT) Received: from eu1sys200aog110.obsmtp.com (eu1sys200aog110.obsmtp.com [207.126.144.129]) by mx.google.com with SMTP id w11si20265665eeh.78.2011.03.15.08.25.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 08:26:04 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of mian.yousaf.kaukab@stericsson.com) client-ip=207.126.144.129; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.129 is neither permitted nor denied by best guess record for domain of mian.yousaf.kaukab@stericsson.com) smtp.mail=mian.yousaf.kaukab@stericsson.com Received: from source ([138.198.100.35]) (using TLSv1) by eu1sys200aob110.postini.com ([207.126.147.11]) with SMTP ID DSNKTX+FBuIfmL2CmNFN9WW8aB5AkiDfbsE3@postini.com; Tue, 15 Mar 2011 15:26:04 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id E350CFD; Tue, 15 Mar 2011 15:25:55 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 9BF7B7BC; Tue, 15 Mar 2011 15:25:55 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 4AB2824C2F1; Tue, 15 Mar 2011 16:25:47 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.2.254.0; Tue, 15 Mar 2011 16:25:54 +0100 From: Mian Yousaf Kaukab To: Felipe Balbi , Cc: Lee Jones , Mian Yousaf Kaukab Subject: [PATCH 3/8] usb: musb: ux500: enable inventra dma specific code for ux500 Date: Tue, 15 Mar 2011 16:24:26 +0100 Message-ID: <1300202671-12818-4-git-send-email-mian.yousaf.kaukab@stericsson.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300202671-12818-1-git-send-email-mian.yousaf.kaukab@stericsson.com> References: <1300202671-12818-1-git-send-email-mian.yousaf.kaukab@stericsson.com> MIME-Version: 1.0 On the gadget side Inventra dma hooks can work for U8500 and U5500 platforms, although they use platform dma. Signed-off-by: Mian Yousaf Kaukab --- drivers/usb/musb/musb_gadget.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index ba5d5bd..f0b7397 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -369,7 +369,7 @@ static void txstate(struct musb *musb, struct musb_request *req) /* MUSB_TXCSR_P_ISO is still set correctly */ -#ifdef CONFIG_USB_INVENTRA_DMA +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_UX500_DMA) { if (request_size < musb_ep->packet_sz) musb_ep->dma->desired_mode = 0; @@ -551,7 +551,7 @@ void musb_g_tx(struct musb *musb, u8 epnum) if ((request->zero && request->length && (request->length % musb_ep->packet_sz == 0) && (request->actual == request->length)) -#ifdef CONFIG_USB_INVENTRA_DMA +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_UX500_DMA) || (is_dma && (!dma->desired_mode || (request->actual & (musb_ep->packet_sz - 1)))) @@ -680,7 +680,7 @@ static void rxstate(struct musb *musb, struct musb_request *req) if (csr & MUSB_RXCSR_RXPKTRDY) { len = musb_readw(epio, MUSB_RXCOUNT); if (request->actual < request->length) { -#ifdef CONFIG_USB_INVENTRA_DMA +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_UX500_DMA) if (is_buffer_mapped(req)) { struct dma_controller *c; struct dma_channel *channel; @@ -898,7 +898,8 @@ void musb_g_rx(struct musb *musb, u8 epnum) musb_readw(epio, MUSB_RXCSR), musb_ep->dma->actual_len, request); -#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_TUSB_OMAP_DMA) +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_TUSB_OMAP_DMA) || \ + defined(CONFIG_USB_UX500_DMA) /* Autoclear doesn't clear RxPktRdy for short packets */ if ((dma->desired_mode == 0 && !hw_ep->rx_double_buffered) || (dma->actual_len @@ -928,7 +929,8 @@ void musb_g_rx(struct musb *musb, u8 epnum) if (!req) return; } -#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_TUSB_OMAP_DMA) +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_TUSB_OMAP_DMA) || \ + defined(CONFIG_USB_UX500_DMA) exit: #endif /* Analyze request */