From patchwork Wed Feb 29 14:44:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 7005 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7931623E4A for ; Wed, 29 Feb 2012 14:44:26 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 38931A1814A for ; Wed, 29 Feb 2012 14:44:26 +0000 (UTC) Received: by iage36 with SMTP id e36so3374426iag.11 for ; Wed, 29 Feb 2012 06:44:25 -0800 (PST) Received: from mr.google.com ([10.43.52.74]) by 10.43.52.74 with SMTP id vl10mr394043icb.55.1330526665751 (num_hops = 1); Wed, 29 Feb 2012 06:44:25 -0800 (PST) Received: by 10.43.52.74 with SMTP id vl10mr327353icb.55.1330526665685; Wed, 29 Feb 2012 06:44:25 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp4552ibg; Wed, 29 Feb 2012 06:44:24 -0800 (PST) Received: by 10.68.204.6 with SMTP id ku6mr6129834pbc.157.1330526664400; Wed, 29 Feb 2012 06:44:24 -0800 (PST) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id l4si18800130pbc.91.2012.02.29.06.44.23; Wed, 29 Feb 2012 06:44:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of jg1.han@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of jg1.han@samsung.com designates 203.254.224.33 as permitted sender) smtp.mail=jg1.han@samsung.com Received: from epcpsbgm2.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0M0500J9USXZ61P0@mailout3.samsung.com>; Wed, 29 Feb 2012 23:44:23 +0900 (KST) X-AuditID: cbfee61b-b7c62ae000000989-5f-4f4e39c6549a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id C4.68.02441.6C93E4F4; Wed, 29 Feb 2012 23:44:23 +0900 (KST) Received: from DOJG1HAN02 ([12.23.119.56]) by mmp2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTPA id <0M0500976SXY6N10@mmp2.samsung.com>; Wed, 29 Feb 2012 23:44:22 +0900 (KST) From: Jingoo Han To: linux-usb@vger.kernel.org, 'Greg Kroah-Hartman' Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 'Sangwook Lee' , 'Alan Stern' , 'Joonyoung Shim' , 'Kukjin Kim' , patches@linaro.org, linaro-dev@lists.linaro.org, 'Thomas Abraham' , 'Jingoo Han' Subject: [PATCH 2/2] USB: ehci-s5p: add DMA burst support Date: Wed, 29 Feb 2012 23:44:22 +0900 Message-id: <000201ccf6f0$a0498b20$e0dca160$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Acz28KAsDpQeLrEFQH6U0N3d/sCc1Q== Content-language: ko X-Brightmail-Tracker: AAAAAA== X-Gm-Message-State: ALoCoQlaOeK+pIv6L3vHi0nL3zn2FALg+F8GHWEj/0RHfHhzI7Qr3/RYjHHPvQLpwa3xC6ktwiL2 DMA burst support is added to improve performance in EHCI data transfer. The USB EHCI controller on Exynos SoCs can use INCR16, INCR8, and INCR4 mode. These modes of INSNREG00 register should be set in order to enable DMA burst transfer. This feature is also related to AHB spec. Signed-off-by: Jingoo Han Cc: Sangwook Lee --- drivers/usb/host/ehci-s5p.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 293f741..465861b 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c @@ -16,6 +16,7 @@ #include #include #include +#include struct s5p_ehci_hcd { struct device *dev; @@ -128,6 +129,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev) ehci->regs = hcd->regs + HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); + /* DMA burst Enable */ + writel(EHCI_ENABLE_DMA_INCR, EHCI_INSNREG00(hcd->regs)); + dbg_hcs_params(ehci, "reset"); dbg_hcc_params(ehci, "reset"); @@ -234,6 +238,9 @@ static int s5p_ehci_resume(struct device *dev) if (pdata && pdata->phy_init) pdata->phy_init(pdev, S5P_USB_PHY_HOST); + /* DMA burst Enable */ + writel(EHCI_ENABLE_DMA_INCR, EHCI_INSNREG00(hcd->regs)); + if (time_before(jiffies, ehci->next_statechange)) msleep(100);