Message ID | 1454648231-1944-1-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show
Return-Path: <linux-renesas-soc-owner@kernel.org> X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1E3F2BEEE5 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 5 Feb 2016 04:57:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6D96E20383 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 5 Feb 2016 04:57:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3257202C8 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 5 Feb 2016 04:57:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751363AbcBEE5W (ORCPT <rfc822;patchwork-linux-renesas-soc@patchwork.kernel.org>); Thu, 4 Feb 2016 23:57:22 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:27278 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750925AbcBEE5U (ORCPT <rfc822;linux-renesas-soc@vger.kernel.org>); Thu, 4 Feb 2016 23:57:20 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 05 Feb 2016 13:57:19 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 3850853502; Fri, 5 Feb 2016 13:57:19 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 0739E480A5; Fri, 5 Feb 2016 13:57:18 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id F3FF8480A3; Fri, 5 Feb 2016 13:57:18 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id PBS03193; Fri, 5 Feb 2016 13:57:18 +0900 X-IronPort-AV: E=Sophos;i="5.22,398,1449500400"; d="scan'";a="205067273" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 05 Feb 2016 13:57:18 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesasgroup-onmicrosoft-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=W+4MOlxk4HUTxcQpqy53J/DoggoytGlX4T5mNKE3z44=; b=OX+Xw4wqiuhBHMG+ng1ltsilbssH0KsuOOC4jouFvFWK1rUzCRNSEyIS+Ikd2aWUhY/b+r8Iftja/OuqfChb8521wPvp1E7U2ht+T/tnHRNxppCuSMH6AwrwNPgn7rRjggJgYmpVrE+mza18lEafdxU9SA08TFIcEVAXLUxKw0g= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=renesas.com; Received: from localhost (211.11.155.144) by SIXPR06MB0922.apcprd06.prod.outlook.com (10.162.173.157) with Microsoft SMTP Server (TLS) id 15.1.396.15; Fri, 5 Feb 2016 04:57:17 +0000 From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> To: <balbi@kernel.org> CC: <gregkh@linuxfoundation.org>, <linux-usb@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Subject: [PATCH] usb: renesas_usbhs: Don't check CSSTS bit if peripheral mode Date: Fri, 5 Feb 2016 13:57:11 +0900 Message-ID: <1454648231-1944-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS2PR01CA0006.jpnprd01.prod.outlook.com (25.161.74.144) To SIXPR06MB0922.apcprd06.prod.outlook.com (25.162.173.157) X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0922; 2:uBpgSomHJxBSdpDZw7fbCI8wJAracAS0Gj+hJlEw3tJwpThKO/fcFG48im75zEln4m7uxkpuoVC0j94h8oT+NJGlj/IGFZP/OOEKs3/BpdbOJC2qNgS+O2iMJsB5BtW3rF8dgeQQBqnVkGzPJtr8CQ==; 3:XsHBrLJRivjcfRAsQ3PjDQYzBYWlpsm3fUmsR7qnB8JvKtjJcK+StGPThHB2v0VYqP5TuVSCCPUkSiuXcW47U9n2oF7XCoFp+mCuXSHQFq+FHuF/2qpjpR+/6WTMsKRy; 25:KwWryvK7c/wb5d6x2ulZlStL7uaI+Zb+T1HFAKnJK3p7zEua2FjYIjdhquqr3HIb4wox5LryzBzRKyuALJAlZXPBJ0taBxL9e2luvD5b5HKXZS0KGfstPdZJ1Md6c2Gx65edis+cqVCvfz3Q+f+R2yrGSKlkqdtzcv3lulJTZSID/QtEYZi6NyAboPnKpiOTGII8GyhhDZR0zFQ9QIqL5+ez4g5ik/418YTPSg618uWUTYl0YeqJ40DkbsI1Ygb1n7eEMfcevjTTNUIzMqCbzHyEyBvI+QaIb/cme2xgir2WAF/b2OhUmhHt3j6nvr4P X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB0922; X-MS-Office365-Filtering-Correlation-Id: 53ff1f34-e1eb-4fc8-1921-08d32de8d251 X-Microsoft-Exchange-Diagnostics: 1; SIXPR06MB0922; 20:LPQshtKDdKPBfQdCs1ZE3DFRuCKbWM696PJF1RSe99T08hxFKMrSJt5qdqLB9A3yQ6qD7PpO9ufttQiLrW/32KzI79RvTsnVrKgrA9/zcqsQKmVZrMW4Rb8xvQE4+PfLUE/g19F4TiiP1Pr03ymH07OpOZRnVCajJ6mdphANOcZFYXxxuwjlkLPH+fR3I9W7Cm2kRplAG15a+jPATOBMlMX4ko0AgfZ+fKo7OkPL3T6pYLqBSSdFhVpyelvCtGzfQYLlfhAQDDkywAwMbsgD6i3TOyiFMvTlPqsmfPLow0UU7hoJddQqg9gl8RdLrH9WVymN0NDts50Jw/bSc57TaZuexqutfIU9vQ3OAFJbdsv0Cs2a09y+Tl9AWR+aJJX1jHjXU8EB7vxuq6sooI2kbZ2Lwjccl/VmzKykzcDG8+3OKQ973Y3KruXtpJP78X5KZXWeaKWsgf/bR06vK9MvMNWfvN3gpjEJ7aSBLUS0bk6wYGILubI/fBM7czqfK8BC; 4:JvnYNbbI90feWLcsxLtlHqSqoUG46NuuSZ0EEm6Q1VmeBTmTLAKDulfeFJ82HecIyUz32ptnc96jbvMU1EWGaN9NAzVLEYgRvQQ68jV0IppGDjZcnwJccbPKxktjR8XdtnjsgStQlpbEnl5wPa2Fn1fNsXsl52V+NjW+TDLVecjaBxVo1sVg4mfsguLwKfCoRCHYq4zaCAcEc5dDa2tKEvQpQxXEV/uK7ACE4WvtxNvF6GvQkV+OUVTQpXVftO01VH52c8TV1wiVT4S7w2SjYIjmW1+sJrQm9rsXQy2xxB1XrN4IjsFZWlbsijxqH/xLOH4SHBeRVTScEritj9DT5wxm0bAgbt/KcvFM+QRvI1FFX9c+Ixj5eL3Yqk++qH3JZ5TEkfd9h5DDfryfWYH220quYDpcs87gAmITjp jHMG4= X-Microsoft-Antispam-PRVS: <SIXPR06MB0922634BFE7F5EB4E8A27793B8D20@SIXPR06MB0922.apcprd06.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:SIXPR06MB0922; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB0922; X-Forefront-PRVS: 0843C17679 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(6069001)(6116002)(77096005)(42186005)(107886002)(87976001)(110136002)(5001960100002)(36756003)(229853001)(42382002)(50986999)(47776003)(4326007)(189998001)(3846002)(40100003)(122386002)(1096002)(92566002)(2906002)(4001430100002)(78352003)(48376002)(2351001)(76506005)(66066001)(586003)(5004730100002)(50226001)(5003940100001)(33646002)(19580405001)(19580395003)(5008740100001)(50466002); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB0922; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SIXPR06MB0922; 23:geK8Z+DeLK6VY9w3oVfdPp9bKvrPZhtOh7kRilNvA?= =?us-ascii?Q?fqObl8bmyQiVWFvspn6CRkpCMqDHuthW6C2E+nXEr0oXsG9+Tez+ckHIAnvj?= =?us-ascii?Q?V079ihsYDK0qUrCmHEvGwdUyw/ZUWgevSw5qV9pcv/8Y9+Wd+fzELeXaAA/z?= =?us-ascii?Q?4ZFvBEGCRMDTRHZX0ldUe6Chckq0c8h0fcG1HEBj9mvxVHhWcoFpEJCFqBv7?= =?us-ascii?Q?w2tYlOV13kGq7jJ/X0CG1C/yui/lGDJntwVIb13J+rGRXRjiMB3uahgV2wOV?= =?us-ascii?Q?lmK0i97iygmaLIPFyLC1M6QJoCAzmSPaP1cjukp23N3KZzhUb2bcet7XGt7i?= =?us-ascii?Q?Sd7HgZMgiz5KEZWc1bomXH+C90D2iiyVYb1qppWPCYtsYX65z+CGr/aE907t?= =?us-ascii?Q?glpaIuzqaFB4Qns5mFUdqo7QCWkaxGXyyWSB+taB4pyTby1feJata4wwsMsN?= =?us-ascii?Q?gasNwMi8hMlfI3LWedDCSkkI6yYUhcl0JQUySAlkM56x1VLBCQuUMEu2JavQ?= =?us-ascii?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lFb59rkROGxLkwek= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2016 04:57:17.0283 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB0922 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: <linux-renesas-soc.vger.kernel.org> X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 |
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c index 0e95d29..78e9dba 100644 --- a/drivers/usb/renesas_usbhs/pipe.c +++ b/drivers/usb/renesas_usbhs/pipe.c @@ -241,7 +241,7 @@ static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) { struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe); int timeout = 1024; - u16 val; + u16 mask = usbhs_mod_is_host(priv) ? (CSSTS | PID_MASK) : PID_MASK; /* * make sure.... @@ -265,9 +265,7 @@ static int usbhsp_pipe_barrier(struct usbhs_pipe *pipe) usbhs_pipe_disable(pipe); do { - val = usbhsp_pipectrl_get(pipe); - val &= CSSTS | PID_MASK; - if (!val) + if (!(usbhsp_pipectrl_get(pipe) & mask)) return 0; udelay(10);
Since Some SoCs (e.g. R-Car Gen2) don't have the CSSTS bit in the pipectrl registers ({DCP,PIPEn}CTR) because such SoCs have peripheral mode only. So, this driver should not check the CSSTS bit if peripheral mode is running. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/usb/renesas_usbhs/pipe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)