From patchwork Fri Sep 21 12:26:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10609979 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9FD817EE for ; Fri, 21 Sep 2018 12:28:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9FF12D533 for ; Fri, 21 Sep 2018 12:28:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7C112D549; Fri, 21 Sep 2018 12:28:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15DB62D536 for ; Fri, 21 Sep 2018 12:28:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389835AbeIUSRJ (ORCPT ); Fri, 21 Sep 2018 14:17:09 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:42364 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389684AbeIUSRI (ORCPT ); Fri, 21 Sep 2018 14:17:08 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 21 Sep 2018 21:28:26 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id D80B175224; Fri, 21 Sep 2018 21:28:26 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,284,1534777200"; d="scan'208";a="291576163" Received: from mail-ty1jpn01lp0184.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.184]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 21 Sep 2018 21:28:26 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rMXJddVYwlrsenoYm+JpKvjixBq2VnMALdJ+/ASEBiI=; b=M+pz2v7ANCLrx25rtBQ/slIpC4MtndqsdWEFfRIB3tlf79XDcYkji6nXNlwcv9S8rRPqr20L56tsg9vR1tPv/K3N0lpNWgwI8RgDWOj9Bv9fZaTg/rkolkeBsWw9HHxDFzwyOEYxWY7a4bN3fwFxvK7VKLmPM6lStEkLxZu1JkU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Fri, 21 Sep 2018 12:28:23 +0000 From: Yoshihiro Shimoda To: balbi@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 2/5] Revert "usb: renesas_usbhs: set the mode by using extcon state for non-otg channel" Date: Fri, 21 Sep 2018 21:26:29 +0900 Message-Id: <1537532792-20376-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1537532792-20376-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1537532792-20376-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSAPR01CA0129.jpnprd01.prod.outlook.com (2603:1096:604:f::21) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46b90e60-b8e9-451d-2697-08d61fbdb97a X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(8559020)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB2293; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;3:qPFL1bf1yxalQxdRJndud2bcdB5i4c1g3iSxx88om1xOpWMarnLi5HU1ts6h4ZJdoT0frYlppBam3Ncg1dp9EJ3Yy9p2lt7t+hKINO42O2AYd4vNc9AevOru08RG/em6/PAyUcaT+fLpu9lrcVLcz18cxrjsexZodlLg98hu6GUfoGVGVCEDMuolaaAB25qLbH6h4MB+H0Tqhevb4sqoZzr2YR7UHblzlY88X2L4bCJqm16WW4paMKH/toIZ+MGB;25:ZxldauaaGmHoDihtqB0BDl/NZx7QD8fUi3GHEvkOwZZdG+/KNbpkf0jhKSDOHfQ3g9Yy4pHwVoKO4ZospgXX2cuHbZJNQG5VJcIf7AAXVSqRwh+0uIDcKRWRHwru4bVOo3gdRA52zBP5ApY/rhwFD4BKW2Xxw07t20wx66y8LU27L57qZIMsZz4PU+ixVKKbXqHlMkoAUCmYsZ/Xk4y/hR7e2yyIeEANqmLVhH6L27xifvz7XOYdHJC7FgSWhSf5JLd56TdNIJTYDfslKqcyaRT/ztRnIwnjsVeYcHipXnJY/qCh/Zqfe7J5+iLJJ5ydLRVEEk/ju+mR7KULDxQKPw==;31:8jCKu6U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n+4KzissUBpsl6Q== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231355)(944501410)(52105095)(93006095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123560045)(20161123564045)(201708071742011)(7699051);SRVR:OSBPR01MB2293;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2293; X-Forefront-PRVS: 0802ADD973 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(346002)(366004)(376002)(136003)(396003)(39860400002)(199004)(189003)(6506007)(6486002)(107886003)(956004)(2616005)(476003)(42882007)(97736004)(386003)(48376002)(47776003)(25786009)(4326008)(446003)(11346002)(26005)(7736002)(305945005)(8936002)(8676002)(78352004)(69590400006)(50226002)(81166006)(81156014)(575784001)(68736007)(51416003)(52116002)(76176011)(36756003)(3846002)(2906002)(6116002)(53936002)(316002)(16586007)(16526019)(486006)(498600001)(66066001)(6512007)(5660300001)(105586002)(106356001)(50466002)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2293;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;23:gTRe7GzykI7Tt9VaHKi6eRF9gWlttRY3bONVe1T+ds8QrtqilUWSof/DUtL1h4PlbBo5Qhk55GKHULqHzgbTfNhdVPILYiqgSPTpiEnJKjqPBRUv1YnoFLjHrzZKZFyugcKazFM80grLIZDW1wP/bWiGdxuZYo53gOg9IXjuJjZ2EvcRssEv47tq4sMRHzKfvIciZ1Tn7/r7VMDUJ8RGsIkiHjkQz0BRwDQ2Kr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aTezKNk3NLy2f8UhMO4YR12eANYIN3hrHZriHvKaK3tPe0aCm4BPNsIm6I2laQBrS7VQlii4ZyX1pgHnU3afflSrOaKq9k9kFOETIR1AySxIyK/T1N+uxjAw/4E74J9jsHrh1wGES75M4wH8FaEnenWjLuoJC1jQ0eQclNSmsmbL8YSFX6rHXjb6Syx/r6Ct6bzBbFNmYxSqsGyB16 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;20:AZIaT+ZrQYPo11pRkbcN74WZGZLhqHGZn9MOslEgJ898lmS81LSgcWbC9fa2tW62lptjXcVPqH5QdoiplfuL0VjAd2rEyIMvg938RzUfyLkQ7RKjGp5dy1JMZgCel9+Ww8OZxSpuviogiFRXG7yZ0wzLzelPMzSl9ao+79I5+B8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2018 12:28:23.9173 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46b90e60-b8e9-451d-2697-08d61fbdb97a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2293 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit cd14247d5c14b9b20bb3d3dfcaa899ca22c8dccc. R-Car D3 can use OTG mode in fact. So, the commit doesn't need anymore. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/rcar3.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/usb/renesas_usbhs/rcar3.c b/drivers/usb/renesas_usbhs/rcar3.c index b9a8453..50e5fb5 100644 --- a/drivers/usb/renesas_usbhs/rcar3.c +++ b/drivers/usb/renesas_usbhs/rcar3.c @@ -27,7 +27,6 @@ * Remarks: bit[31:11] and bit[9:6] should be 0 */ #define UGCTRL2_RESERVED_3 0x00000001 /* bit[3:0] should be B'0001 */ -#define UGCTRL2_USB0SEL_EHCI 0x00000010 #define UGCTRL2_USB0SEL_HSUSB 0x00000020 #define UGCTRL2_USB0SEL_OTG 0x00000030 #define UGCTRL2_VBUSSEL 0x00000400 @@ -50,14 +49,6 @@ static void usbhs_rcar3_set_ugctrl2(struct usbhs_priv *priv, u32 val) usbhs_write32(priv, UGCTRL2, val | UGCTRL2_RESERVED_3); } -static void usbhs_rcar3_set_usbsel(struct usbhs_priv *priv, bool ehci) -{ - if (ehci) - usbhs_rcar3_set_ugctrl2(priv, UGCTRL2_USB0SEL_EHCI); - else - usbhs_rcar3_set_ugctrl2(priv, UGCTRL2_USB0SEL_HSUSB); -} - static int usbhs_rcar3_power_ctrl(struct platform_device *pdev, void __iomem *base, int enable) { @@ -83,14 +74,10 @@ static int usbhs_rcar3_power_and_pll_ctrl(struct platform_device *pdev, struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); u32 val; int timeout = 1000; - bool is_host = false; if (enable) { usbhs_write32(priv, UGCTRL, 0); /* release PLLRESET */ - if (priv->edev) - is_host = extcon_get_state(priv->edev, EXTCON_USB_HOST); - - usbhs_rcar3_set_usbsel(priv, is_host); + usbhs_rcar3_set_ugctrl2(priv, UGCTRL2_USB0SEL_HSUSB); usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM); do {