From patchwork Fri Aug 7 07:15:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 6966541 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 CDFCF9F38B for ; Fri, 7 Aug 2015 08:31:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE0C520658 for ; Fri, 7 Aug 2015 08:31:35 +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 0207320657 for ; Fri, 7 Aug 2015 08:31:35 +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 1ZNd0u-0004iR-Ml; Fri, 07 Aug 2015 08:28:28 +0000 Received: from mail-bl2on0117.outbound.protection.outlook.com ([65.55.169.117] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZNczW-0003a9-Fe for linux-arm-kernel@lists.infradead.org; Fri, 07 Aug 2015 08:27:04 +0000 Received: from BY2PR03CA067.namprd03.prod.outlook.com (10.141.249.40) by DM2PR0301MB0862.namprd03.prod.outlook.com (10.160.215.148) with Microsoft SMTP Server (TLS) id 15.1.225.19; Fri, 7 Aug 2015 08:26:39 +0000 Received: from BY2FFO11OLC003.protection.gbl (2a01:111:f400:7c0c::111) by BY2PR03CA067.outlook.office365.com (2a01:111:e400:2c5d::40) with Microsoft SMTP Server (TLS) id 15.1.225.19 via Frontend Transport; Fri, 7 Aug 2015 08:26:39 +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 BY2FFO11OLC003.mail.protection.outlook.com (10.1.15.183) with Microsoft SMTP Server (TLS) id 15.1.243.9 via Frontend Transport; Fri, 7 Aug 2015 08:26:39 +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 t778Q8l8019852; Fri, 7 Aug 2015 01:26:35 -0700 From: Peter Chen To: , Subject: [PATCH v3 07/10] usb: chipidea: usbmisc_imx: add non-burst setting for imx6 Date: Fri, 7 Aug 2015 15:15:44 +0800 Message-ID: <1438931747-25209-8-git-send-email-peter.chen@freescale.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438931747-25209-1-git-send-email-peter.chen@freescale.com> References: <1438931747-25209-1-git-send-email-peter.chen@freescale.com> X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC003; 1:qT4CkzPv+4fNc1UKsFWBMCRC5dl6FJ3RQpRcJgx0cQnGlclW6IqVZBepOIY/eJ1m2ZKk9MjwQjFx2HUdHZXlYS/tukUC4P1mgvooDsZDmM/HRGudzFNH8alD2jhAEhOcDNFQifFJCldzLWQnv0eOcDt+hFfUgpswJwayWbbMzRneqSydX2jMcQNgCcdbvsS7kOIhfgD/rdn4yPIKeQFrnfyXNeZxlpcmsfYzHzLgQ2tJZpYKo1W9voI7z3hsxAP50z9SJLBpYmyz5V3PB38Xx/ZzFWaRpTO0CI65tJI5GuxW4rtDR+Wao+el+XMUAPV2Xo1bpQmAdoC4yqxryrqejw== X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(106466001)(5001960100002)(229853001)(104016003)(105606002)(77156002)(33646002)(36756003)(2950100001)(68736005)(5003940100001)(50226001)(64706001)(92566002)(77096005)(47776003)(50986999)(87936001)(189998001)(107886002)(76176999)(48376002)(46102003)(50466002)(6806004)(62966003)(85426001)(97736004)(4001540100001)(5001830100001)(5001860100001)(5001770100001)(81156007)(86362001)(5001920100001)(19580395003)(19580405001)(69596002)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB0862; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0862; 2:wGdKR4brUitubx9JnI5NAPUIkdp/a5B5yL5f53wM1M5xDqPVvoSPhQZD4YZPicT2EEkP9RncICWdCz+zgDUTOFPPECPiapMosqUvYG3UV+RFR/ht1ELxv7/Bd3JEABf5bJvuq9gjutw6ipnk7VNGzlik4HxjYukDKxXXmpT4hkU=; 3:izknaHFppllsKItqgETOJn3HdK6cDSSLMQpnHJ3Cdj56OKE2sMg8kf8tPz2ISRDmjGwoJIjcpfU9QiEieXqC8RGwyrZZinpD7mWp2uEmWROe/0ytoQMMvdJ4whswtaxpfzEY+fULpsoBzBAdPVovAxNoKPyfYUoji3EDOUWuu0LW/s1iY124hsZKtreJYunZ5HbSPnoi6G/IX7ULza2nKWfKHE0th/9ns5lqCooMUtw=; 25:B+ypb8/8nPxn8DeJIiqkfXgbCFhm40pz2pPlnf3slJvqNhZ9rHzr3VzUzlVADx4ZznmGk9dftPybs4a6E24turoLY5ac4mjCMC3q8abFyydfkqp8hjyVsiCxMM47v2gvDKGwSefRnvjCjiPl9if31Gu4UK3pimZJgQ7U1B+vqo5TUqoUJ4acMegv+uXphVSCtVGT7Njz07viPkBeOu/gkLifTwCu30Z5jJawXV/heKjJZvBQzXU4YaX+3cvKZYf9T3GXUNiAaMR2E5+gpJp11A== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0862; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0862; 20:2JDVFoneoi47ipWUjKYIcmavKfJTTDsdY5iFzXu+1u/LZ69mxkKdm4O7Utpg9rBomySfdWUpjhCA5bP39o7QTIH/A44wGI137pgf1mO3NLdLU9lXgoyNTk12t1cexbXMd61Y2u6gif0gKvX2gC+9QFDRLKlY+gWL1v5Mtvz0lwOMD/dfmfT1bxXM9E1+eaQpeO30rWW2zW6P4gXSVyXtRe1canSI4dZY61uWANwKH56X/wwQDFkLz0DLKrNWwuk6s7KNzoXIOKtKDl4q4kwdJeZCWFIoQJslyq1i0fdqwMpE/Lb+AtUsNuXtcewYgd4CtaKCY9MuT+izucGWY3tamo0WtpuF+/fDEEU9LrOlQYM=; 4:VrDqIr80wd9Fe8UC7wbXFpFxjqKE+vEkhRqzyYKAwA5I39rvwRv40YpnJLZBULcEi3CvwTuVWGNS42mtYyaO7RiEKn1YRGfoZA4qfIdj2NYoDSbdSl5C3DOSmMC/ilmM5HXOam2+jSRjgdcbqX9tRU8JqaE6SRClyzBM9LnnevDQXwzomaNsubAOGN8z+IlzSxrDORu+OoDeQQIiD8mc1RP2FANe7BSGBqHnSiCdY9PTh2QWlVwatrWDTDqbVWg95YTKA5lDO0ZtEEzdEUWMdYuc23PMLzEUCSDAVg+NHAU= 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:DM2PR0301MB0862; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0301MB0862; X-Forefront-PRVS: 066153096A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0862; 23:VVhHFMp6q6EPh+V63mjwt6+l4ap24ipotW+tC2J?= =?us-ascii?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o+jnlPue0BiWw+2X1loEppmy7LVkXOSPTHi/?= =?us-ascii?Q?S3cwpJHUxUb3hlZaVshRzGFSlXhAjZoeRkPxnsqTqyplwRf3jSq1Uu6ieVQA?= =?us-ascii?Q?3Ok01yHqjmPDt69ywVdigi2uwMsksNieFBPjoJQM2Vh2MiG/RDhJgpyXlylH?= =?us-ascii?Q?afRrkgzbIJmD+bX1NlgLuBUKJYnJxelu29XZ39+XTb8LYELJaNKZJR6mCyGw?= =?us-ascii?Q?F9V4/mn7z1O9iP/XQSQAlcT8vq1WwYPPQmfMUJCNlCHIG230KNxzZivKyFdy?= =?us-ascii?Q?GlZnfi4ooOQ2pAaQ=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0862; 5:wGa8gjNGEDa1Mty+H9+37Jz4YRWrlHD3bXhhN3mlZVzyvZPAscm18hTCJtO6B/akP/mRyQU5QGroO2RDf8IzOThpKzUWEOu5Sfi5EJTKUvQBWQSSuutQmp6w6ZGSeqxwvSi4EXq4Y/ut9MuqXFm6eg==; 24:ErYU/y8jhFFH9wksViLCQjSU/xT/ei6GcP8x6Ha7F/fmLf1arWSdSmxDAlBeVT6VYZV6n3/bd/wS+PXSTNRux63e1wlgs4NxZS3I4WMrb+M=; 20:d1ffGs6s9gVtvUMQxVmaT0LhrrqmuglHjWBG7GbGxxKdI2yhEIMbV2a9vJQzJZbnJP5Z9556eDrGZBhOUtG/Kw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2015 08:26:39.5900 (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: DM2PR0301MB0862 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150807_012702_962075_C0440BD5 X-CRM114-Status: GOOD ( 15.26 ) 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, 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.3 required=5.0 tests=BAD_ENC_HEADER,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;