From patchwork Mon Aug 3 04:47:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 6927301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6B1B69F39D for ; Mon, 3 Aug 2015 06:01:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEF9E20504 for ; Mon, 3 Aug 2015 06:01:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DDD2B20532 for ; Mon, 3 Aug 2015 06:01:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZM8mW-00012C-29; Mon, 03 Aug 2015 05:59:28 +0000 Received: from mail-by2on0146.outbound.protection.outlook.com ([207.46.100.146] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZM8lN-0008Qt-LB for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2015 05:58:21 +0000 Received: from BN3PR0301CA0015.namprd03.prod.outlook.com (10.160.180.153) by BY1PR0301MB1221.namprd03.prod.outlook.com (10.161.203.17) with Microsoft SMTP Server (TLS) id 15.1.225.19; Mon, 3 Aug 2015 05:57:56 +0000 Received: from BL2FFO11FD050.protection.gbl (2a01:111:f400:7c09::192) by BN3PR0301CA0015.outlook.office365.com (2a01:111:e400:4000::25) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Mon, 3 Aug 2015 05:57:56 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD050.mail.protection.outlook.com (10.173.161.212) with Microsoft SMTP Server (TLS) id 15.1.243.9 via Frontend Transport; Mon, 3 Aug 2015 05:57:55 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t735vQhf030467; Sun, 2 Aug 2015 22:57:51 -0700 From: Peter Chen To: Subject: [PATCH v2 07/10] usb: chipidea: usbmisc_imx: add non-burst setting for imx6 Date: Mon, 3 Aug 2015 12:47:15 +0800 Message-ID: <1438577238-10153-8-git-send-email-peter.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438577238-10153-1-git-send-email-peter.chen@freescale.com> References: <1438577238-10153-1-git-send-email-peter.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD050; 1:lGBBf2jjUfjavBHNJc4kchrVvvKdoAGlokWf62vHtCkDhFABgqzIXDNvAZkL/IcPe6zksWIJGBAuYN+qmOmP7Q3Xt/riqu19CXULsVoAwLN+LJk0Qh48hzUdYQnodOeWUAC9t/jujNQDK2KRgO6fK8IThM1OkK18Cbp1C+5LCd7MwgyNzPmhd7Tq7RmyhCulbz2TPvoA6CA7/CgHEoClvt9FZrVT9vcAZrXjJTnHUG3eQos/lMj3y3Z3c+eScxKDXSuCNrb4uE9fm01UjhWe9nDyz69pbCPLYcMrDZpzmRDEjZawkPweL4s4/QgPg2pUXh1YY0mK5r05PUlmXscXeg== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(189002)(47776003)(5001960100002)(110136002)(189998001)(107886002)(36756003)(92566002)(77096005)(86362001)(50226001)(2950100001)(85426001)(87936001)(62966003)(50466002)(2351001)(50986999)(48376002)(77156002)(76176999)(19580395003)(19580405001)(229853001)(104016003)(106466001)(33646002)(46102003)(6806004)(105606002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB1221; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1221; 2:zlwoZJpsJIJj9EQwSsLC1QeJZ9ZBypVAHuQMiBAyyQYUy4KA3FPnZG7QMu15SS/KyCpV/Jbg04TExOMedHvNUCQgz6R+o5reGu8JbAQwemtkkOGdLMCc563dwUsbJpv3M2dBQpFZ38AJKFdDBnV/WuAuTODGygnl+Cj5OycTAg4=; 3:6Woa6E7wAIdCjgJcGc/BKyobfBF5DuwV+WLDMn5IngJAS5L2wYg40KOoxMlLo2wMH3SX2uqR4/4Ja6lBtmpc7vyVfzF2jAPiTMTs3vjfnFNKQx6G+KbESOQODt50jDt7sfPy1PV5xGMDhQ8IvBzbZFHQqNUL1Mjj9JOGMFa7wwsg7Cj5CY4OnPQdNx8sc48kmcNF/T6EESxTyJpWFl/TQZloK17uBGf+ALelzBJTxoc=; 25:6eo5Ogp7juPQaYB6HxI5f8/v4V7tQJ9L2yTOE1Tron/xU6dwxSHCoIrAy7KFeSuIbkpaFeVa1U9yDmxctkG/m+nIfsplbX3ibqtH4U2q+UGB6ZQAILFS9iwHNIvMSQTb+tF4EvLrQrPLp9zhRiVBUeYgI6LKMtfBEZTsFItIRWY7loEVDhB2irfRM9uliQ6pIszD6vBcZyE20YrSeE6VpcEIAvXzS4fRt0btyaeTgcObYRackf4snIzClpALyR74PMCKXt7CFrnqkqAghrUn3w== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1221; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1221; 20:5kV2uvY8O8SH8uWyTUy3L3vvO/vVO+4YvbxR1S/R0/Yi/eviw3mi1B5hkL91rXT9IloPgRgylryDDklCXe80Bev9eLg3d10l+nJw50DQ7GrW/7qWy0+DYSwFpzG6vBLjHFi7dQBirdZyWmVH+3EUBVxvHO5kUzFcH0XNJMGUIB0t+JTxIJOvm848fdWuKFriYvB3oXxGXygvJ9/Z2Jl0rkXsafiM/INuzDJCvTzVSEaFJ+maA7+S1gUipiODZMsvKSnSa5Vc9JP8zYwT9vSMtCrxJXlTjXgOUNtTI6qh43R9mo/2lafi4pcrj/dSC83A8W6xHxypAHfxgHYmbW6qjWxou19XDvKEbKbZBAiS/ck=; 4:/m7e9nuMaaMA4ajgb4eneN0RdSMdGDwVQCqE1Hl2aljC02VjYW/Nept1ecWo+sVlVW5Mh7qCK0+FcrGitIBnbLB1V6Aw6rB1ujf2aeeiOVHVijHz/tUVntppYcBx3b0F28/u9wqoCFhT4Xb6AG6n1EenOGEmbspavNN4If1sNiqz/1NmVNLtasC2Tsc0j03zMiO6GgaYOEozaBJrONPte10YJU5CQkdjdASxgaAFdljJ6j09TdAI0AHNTrcYUe9/vV2C+uwrY4vaunAdR2Os5g8Gced3Z2Dae2ZAdFSKObw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BY1PR0301MB1221; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB1221; X-Forefront-PRVS: 0657D528EC X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB1221; 23:AxiTC+4g9U+sEDNWpEqXFKd6zhc2TimciMZL69XPtFZICeZeLdj6D/ubQkI5LUvNdZvbwdNSjBzDhA58JF3dQ8NW/lMBWK4T/tPBQIKdg7u8djxuCYOk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FdyOp+5khPRXIFvUuYT+r8y8bJnsq566QSwEzhrciA0By3o5uJk=; 20:nRz6CLU5aBE/Wf/LkYSs01fDnDCe5qK30MM+pBHwF0XeqdyChU6ixnvyvDYaExtcv0W7dqABwK9UxgI4ZWNWbQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2015 05:57:55.5652 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1221 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150802_225818_070038_435975E3 X-CRM114-Status: GOOD ( 15.23 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, pawel.moll@arm.com, gregkh@linuxfoundation.org, s.hauer@pengutronix.de, jun.li@freescale.com, robh+dt@kernel.org, Peter Chen , kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With this setting and AHBBRST at SBUSCFG as "Incremental burst of unspecified length", each non-burst size can be taken as single transfer. It is benefit for non-burst size transfer. Signed-off-by: Peter Chen --- drivers/usb/chipidea/usbmisc_imx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 3cefd49..5ddab30 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -54,6 +54,7 @@ #define MX53_USB_PHYCTRL1_PLLDIV_MASK 0x3 #define MX53_USB_PLL_DIV_24_MHZ 0x01 +#define MX6_BM_NON_BURST_SETTING BIT(1) #define MX6_BM_OVER_CUR_DIS BIT(7) #define MX6_BM_WAKEUP_ENABLE BIT(10) #define MX6_BM_ID_WAKEUP BIT(16) @@ -255,14 +256,21 @@ static int usbmisc_imx6q_init(struct imx_usbmisc_data *data) if (data->index > 3) return -EINVAL; + spin_lock_irqsave(&usbmisc->lock, flags); + if (data->disable_oc) { - spin_lock_irqsave(&usbmisc->lock, flags); reg = readl(usbmisc->base + data->index * 4); writel(reg | MX6_BM_OVER_CUR_DIS, usbmisc->base + data->index * 4); - spin_unlock_irqrestore(&usbmisc->lock, flags); } + /* SoC non-burst setting */ + reg = readl(usbmisc->base + data->index * 4); + writel(reg | MX6_BM_NON_BURST_SETTING, + usbmisc->base + data->index * 4); + + spin_unlock_irqrestore(&usbmisc->lock, flags); + usbmisc_imx6q_set_wakeup(data, false); return 0;