From patchwork Wed Jul 29 02:42:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 6889071 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 BB14A9F380 for ; Wed, 29 Jul 2015 03:57:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF47D207B0 for ; Wed, 29 Jul 2015 03:57:33 +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 15C69207AF for ; Wed, 29 Jul 2015 03:57:33 +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 1ZKISn-0001F4-Og; Wed, 29 Jul 2015 03:55:29 +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 1ZKIQH-0006BJ-HM for linux-arm-kernel@lists.infradead.org; Wed, 29 Jul 2015 03:52:54 +0000 Received: from BN3PR0301CA0057.namprd03.prod.outlook.com (10.160.152.153) by BY1PR0301MB0856.namprd03.prod.outlook.com (10.160.193.15) with Microsoft SMTP Server (TLS) id 15.1.225.19; Wed, 29 Jul 2015 03:52:32 +0000 Received: from BY2FFO11FD030.protection.gbl (2a01:111:f400:7c0c::159) by BN3PR0301CA0057.outlook.office365.com (2a01:111:e400:401e::25) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Wed, 29 Jul 2015 03:52:30 +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 BY2FFO11FD030.mail.protection.outlook.com (10.1.14.211) with Microsoft SMTP Server (TLS) id 15.1.231.11 via Frontend Transport; Wed, 29 Jul 2015 03:52:30 +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 t6T3q5pT011896; Tue, 28 Jul 2015 20:52:27 -0700 From: Peter Chen To: , Subject: [PATCH 07/10] usb: chipidea: usbmisc_imx: add unburst setting for imx6 Date: Wed, 29 Jul 2015 10:42:11 +0800 Message-ID: <1438137734-27311-8-git-send-email-peter.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438137734-27311-1-git-send-email-peter.chen@freescale.com> References: <1438137734-27311-1-git-send-email-peter.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD030; 1:OmqqB+dGz4SngTbOLWfUkpUeqjHDyU+yiKm+kwOOWGYRzFxwuD6UgYcOAPOTPSmUYSSlXKcSqvCdNNoJWDVBQ9GUxB0W+qeJHPDIFImThyiAimah6UKPL6FbBKGpYXqB8Wa5lCv9U6vLH1toeZTSo3alUXmYp2UOFbnlxQLlQw4NBpRMDP4YBkqg7MC9ZFDPpHYh/fHNwiB15ZqSTYoF6npDJ7m6rXSxPhFkfRW6kiv5P40W4dNqC1RBnJGh0Wn+FJpJaiDUZbjEsLtZXjbrvdJPG5u1Uuatg6RzYphzahe+/K2i6oI0B07mpXbi3oJwU+dJAa3C17N6aUT1VQj8Kg== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(36756003)(19580405001)(50226001)(62966003)(19580395003)(92566002)(2950100001)(6806004)(46102003)(189998001)(77096005)(106466001)(77156002)(5001960100002)(48376002)(47776003)(86362001)(33646002)(50466002)(76176999)(107886002)(50986999)(229853001)(85426001)(105606002)(104016003)(87936001)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR0301MB0856; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0856; 2:i8WfuQ0+tokyhRP2eoWaDrMwXAmpoX6GdgJGTJD1TaHXRevWULJ3jFWs9sYj4oU+b+XRbKdq/Y+8Pj7drB+ieKvlO5J5HBExTA651vi5ghLMYD04QrO/TUbDIxSePBFBHLDqfqNTbFDTb1fjVavRFmpVn4IB7kSl2QXt05sHFGE=; 3:FSfgeK7mQPACTL5MnrX3aEj/J7rUZrGKoOfzADv53bNUNjOQ8ZXTm72FVaynjhLSgGLvi51u8xnStGUvgZcaoPHa2HF/Kns2q+Gm+/V10uRf8C+gR44T7qqalujING7a4yWjQihRR/MlmATIteHBbKhKwOSGNC3NBZ6YZiFkNLRrl2EOZcHkgXlc0ZAXia0gvvVARyJVfWaLqoeSV+iGOBnr/aSk4sXNl7IeRkpYZFQ=; 25:qbrVRIY6xfsxbAS7tB7W0VKmCdZ4tso48KUlYsge8tJ+I6huiTeehan4IrvxqNhS1X+6RzmJygJVAOEQHf1W2SkaDxtd4jwGN9OFHElFhaZmq8IULUYx/M/PH29P9VtU7LNfSZePE0GmrOg0QiUJO78qrhqT2szhjIzbWC0KcQu9qnL5ZD/lpe5HiUYvCt2zweG0c1rJ4YdKkvGdNCOfM0xBQiDMJo6a/MVJbGizq1RZfyrpxk18PiRnHHx0Cs5JreoJPDjKiHfb9m9kNV7sdw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB0856; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0856; 20:4W5x7yIbppSTAOZp3bOq8vKQn0o9OqIlOujcwN7Pwp9p6nrgoCf41uMzrCuGmxH7PXsw2AsXk9V44/BJ2Q1idw6eOgWnLbGiY6kmuuH5G1la9kKN2UruurPSqh3MrTTw2BKON/wjEwLaG4oGV9CT7JE6O161QzffgBPqEs56uLCZKshw3zoIV5Z4E9jgLNCrA6DFYGuT7yO/ZiRzD5KsKXBmT1pTxurI3EYyJ4x/xLg3T4YICtRsOnn5odZoitr+koQwVgo3f60G9a8n+8WvZepdGDqkBeFbAIdcg+LQuVG68zE7Xhvv3jJpVr4em2LgRYPlTCMN8lijA1FoWAjXwVLutBfo276BCJhluKFEDrs=; 4:UjmQ/Rn3846c4tYcoXDc+tkhevolmRRZgtOYQr86+ZLAYfboVzzbLRRZA7fJdAglFIC1jAOFPctG9wshbZYKjpEFGerg5tz/bHgJJWS0WmGQJS9zq/uEeuZJyRmv56aIV/YQadUHbh+B2+RK2oAhLELM0MrElPJmlmdhDr6tUJZunya3vO5WI0zI0TJ75tFiUY3UAg7xN8RZmcNN2FGSPnyhu/1osFpa10ethUAXvboXSS+J+rf161XYYTd1hnGNe1oKaJzyJiUGEWnWl+CejBMu62M3kRnDPJrn3hWaT5w= BY1PR0301MB0856: X-MS-Exchange-Organization-RulesExecuted 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:BY1PR0301MB0856; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0301MB0856; X-Forefront-PRVS: 0652EA5565 X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0856; 23:DvvkhM4WLxzmUxOGCbSDvdoQPf2R5WfluDEtf/JZc04sau4/zBHYVMhVYv7c2oCFObprzvdRKaVRdodNPEDT9alzeF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amnOdTjxJwJX9W0OCcYwNgDoxGlLdY=; 20:ljqjHpNWhv5pRWPMc4sO7zi07CODDpbG4r2Cn4xwljhh64wQSbB2nCJ1R7aTxdj+sZD4phCMsFSUKAKXR5i//Q== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2015 03:52:30.0751 (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: BY1PR0301MB0856 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150728_205253_698034_3E7F2BF6 X-CRM114-Status: GOOD ( 15.44 ) 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, pawel.moll@arm.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=-5.6 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 unburst size can be taken as one single transfer. It is benefit for unburst 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..69d39dc 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_UNBURST_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 unburst setting */ + reg = readl(usbmisc->base + data->index * 4); + writel(reg | MX6_BM_UNBURST_SETTING, + usbmisc->base + data->index * 4); + + spin_unlock_irqrestore(&usbmisc->lock, flags); + usbmisc_imx6q_set_wakeup(data, false); return 0;