From patchwork Wed May 15 12:03:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 16957 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B157A2396C for ; Wed, 15 May 2013 12:04:43 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id t10sf1473857eei.2 for ; Wed, 15 May 2013 05:04:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=aUAemnpTlpomhlecTsaLK7Vze8L2IiP7lYLdSRojOlw=; b=F5URGh69B4ra2DPRK+UpC1X7ez5Dnm9vQ/DqRrIJraX6VAO1YfIVuIJQqj+dSqYKHJ e9hCJP2nG9/lzPmJ/XjQL0zlzc7C0qQ81aTYVf6IGQFVBxrbKkF1thXAjqhBTP2PDTq8 rm21QRXSu0CJ8pCYw77mCrIvxC8WTH0wmX1BlMre9iubZ6TgCWRRzNTB73F0jK7y2qo0 QVQcSgzFXg29Ifzd3iMdizCnqfPwdVSyguCFBjVc7cgEQKqbJ1ypC02xIw7FVqRFdTqn p/GVAzV2EGEjpHKW7om7OGan5muOU5w4vcLFqrCZgt3IDRN/zXcIzpQ9pfWDmGVzwz5T PK0g== X-Received: by 10.180.210.161 with SMTP id mv1mr2312729wic.1.1368619445465; Wed, 15 May 2013 05:04:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.8.199 with SMTP id t7ls525373wia.39.gmail; Wed, 15 May 2013 05:04:05 -0700 (PDT) X-Received: by 10.180.72.227 with SMTP id g3mr14200732wiv.1.1368619444829; Wed, 15 May 2013 05:04:04 -0700 (PDT) Received: from mail-ve0-x235.google.com (mail-ve0-x235.google.com [2607:f8b0:400c:c01::235]) by mx.google.com with ESMTPS id wi5si650096wjc.145.2013.05.15.05.04.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 05:04:04 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::235; Received: by mail-ve0-f181.google.com with SMTP id pb11so1774742veb.26 for ; Wed, 15 May 2013 05:04:03 -0700 (PDT) X-Received: by 10.220.189.9 with SMTP id dc9mr24289880vcb.8.1368619443697; Wed, 15 May 2013 05:04:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp16051vcb; Wed, 15 May 2013 05:04:02 -0700 (PDT) X-Received: by 10.180.189.136 with SMTP id gi8mr14084819wic.11.1368619440497; Wed, 15 May 2013 05:04:00 -0700 (PDT) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [2a00:1450:400c:c05::233]) by mx.google.com with ESMTPS id e6si685485wib.125.2013.05.15.05.04.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 15 May 2013 05:04:00 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::233 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=2a00:1450:400c:c05::233; Received: by mail-wi0-f179.google.com with SMTP id hq7so1529883wib.0 for ; Wed, 15 May 2013 05:04:00 -0700 (PDT) X-Received: by 10.194.243.170 with SMTP id wz10mr3652088wjc.53.1368619440083; Wed, 15 May 2013 05:04:00 -0700 (PDT) Received: from localhost ([2a01:2003:1:1025:8e70:5aff:feac:ad8]) by mx.google.com with ESMTPSA id b11sm9272594wiv.10.2013.05.15.05.03.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 15 May 2013 05:03:59 -0700 (PDT) From: Fabio Baltieri To: Felipe Balbi Cc: Linus Walleij , Lee Jones , Praveena Nadahally , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Mian Yousaf Kaukab , Fabio Baltieri Subject: [PATCH 01/10] usb: musb: enable ux500 host side dma support Date: Wed, 15 May 2013 14:03:24 +0200 Message-Id: <1368619413-24647-2-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1368619413-24647-1-git-send-email-fabio.baltieri@linaro.org> References: <1368619413-24647-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQm4A5+gZreNmzt6vFW8YIFYh61hoeQYQXHEFYu0kF/gBXkxIA+3YqYhptaNQuwTphJmfmxe X-Original-Sender: fabio.baltieri@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::235 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mian Yousaf Kaukab Host side dma support for ux500 is enabled by piggybacking on Inventra dma support. Acked-by: Linus Walleij Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Fabio Baltieri --- drivers/usb/musb/musb_host.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 8914dec..1a6b5a9 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -625,7 +625,7 @@ static bool musb_tx_dma_program(struct dma_controller *dma, u16 csr; u8 mode; -#ifdef CONFIG_USB_INVENTRA_DMA +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_UX500_DMA) if (length > channel->max_len) length = channel->max_len; @@ -1659,7 +1659,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) /* FIXME this is _way_ too much in-line logic for Mentor DMA */ -#ifndef CONFIG_USB_INVENTRA_DMA +#if !defined(CONFIG_USB_INVENTRA_DMA) && !defined(CONFIG_USB_UX500_DMA) if (rx_csr & MUSB_RXCSR_H_REQPKT) { /* REVISIT this happened for a while on some short reads... * the cleanup still needs investigation... looks bad... @@ -1691,7 +1691,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) | MUSB_RXCSR_RXPKTRDY); musb_writew(hw_ep->regs, MUSB_RXCSR, val); -#ifdef CONFIG_USB_INVENTRA_DMA +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_UX500_DMA) if (usb_pipeisoc(pipe)) { struct usb_iso_packet_descriptor *d; @@ -1747,7 +1747,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) } /* we are expecting IN packets */ -#ifdef CONFIG_USB_INVENTRA_DMA +#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_UX500_DMA) if (dma) { struct dma_controller *c; u16 rx_count;