From patchwork Fri Mar 10 13:01:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9616851 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.web.codeaurora.org (Postfix) with ESMTP id EC55060415 for ; Fri, 10 Mar 2017 13:03:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1753928705 for ; Fri, 10 Mar 2017 13:03:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 087E128709; Fri, 10 Mar 2017 13:03:50 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham 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 1B9412870D for ; Fri, 10 Mar 2017 13:03:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935531AbdCJNDq (ORCPT ); Fri, 10 Mar 2017 08:03:46 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:63161 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936366AbdCJNDj (ORCPT ); Fri, 10 Mar 2017 08:03:39 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 10 Mar 2017 22:03:35 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 27C6D6F6B4; Fri, 10 Mar 2017 22:03:34 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 29E7128076; Fri, 10 Mar 2017 22:03:34 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 241D428070; Fri, 10 Mar 2017 22:03:34 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id YAB06846; Fri, 10 Mar 2017 22:03:34 +0900 X-IronPort-AV: E=Sophos;i="5.36,140,1486393200"; d="scan'208";a="236324886" Received: from mail-sg2apc01lp0243.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.243]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 10 Mar 2017 22:03:33 +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; bh=Va2XZ2wrM7TV3hqx0qbidcm2fHT2ihFRxKHKr9Do9CQ=; b=CSYe2OpfZLthEqW8c+BkCjm1/61PBGvAXDfgr5g/3EFbmN3L4n20K/WyCqWm15RXTlBvT3OA8g+yA7se7vjWJRC080ka61Hn/pnaK/lFARhTO4LTPAshj9fV2LCgsfCD4XUCzSSqTRD1TGkeahjqRvVEpf1KKIJk7jrd5gsc3hQ= Authentication-Results: rowland.harvard.edu; dkim=none (message not signed) header.d=none; rowland.harvard.edu; dmarc=none action=none header.from=renesas.com; Received: from localhost.localdomain (211.11.155.144) by KL1PR06MB1639.apcprd06.prod.outlook.com (2603:1096:800:12::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Fri, 10 Mar 2017 13:03:31 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH/RFC 1/2] usb: host: ehci-platform: set hcd->phy to avoid phy_get() in usb_add_hcd() Date: Fri, 10 Mar 2017 22:01:25 +0900 Message-ID: <1489150886-27862-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489150886-27862-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1489150886-27862-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0116.jpnprd01.prod.outlook.com (2603:1096:401:d::34) To KL1PR06MB1639.apcprd06.prod.outlook.com (2603:1096:800:12::21) X-MS-Office365-Filtering-Correlation-Id: e5d17d47-e051-455e-c770-08d467b5daa2 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:KL1PR06MB1639; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1639; 3:yybZAOd/IYuKaP4g35uxo4v83hBYRN9J34J4U9TOpSA96H0EwDEy/bHyNKHDNeJG7zBZkrps5Po8Nyy7+c/UmWTU6+xwHHml85J1O9Ps4ie1sBUmUrkk/nTiIrz9wn/yzVvxZB4nhs+pNFJU++gtOqZndn2O6LcCAzAXcHUlIOlr0q6rqEFpjNJfnd3F/2NUDL7Kna8cQpvs4JV2BL4Q/y1scc8wH7TQaHxltydydZ8CyypCTIOBOxuyWaSHOAzR7g6AXdFgf/mmSrqkNQ6ZEvBnbupyjiY4XD5vUNnqbbc=; 25:So+Ng3/eEvYuXSJ9CABpCEWf3s7LMzDufbuRHUWGGBW88EzvNX4tOZrh/oB7cFq6gcvM0uBYISHsBvHYTYgII0lpY+loiCN5iC60gGuenP2FwW+F5g9lJ5/hfQqa8typ2Bd4CQG/dAIM0KmsmzJ4WWk141PnmdIGlz1ezj+Er5ATm5XUiV8gcjP/xREPEGhthRnLI+qTH5GWqxD10UjG9bM/c9GClq5Yl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: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(6072148); SRVR:KL1PR06MB1639; BCL:0; PCL:0; RULEID:; SRVR:KL1PR06MB1639; X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1639; 4:9xCiNRU8x5MVcFKhK0JYxXGskdKKzcz+cXUNYq7Vd+kYMdvJhPEdXixBiMtkEY87wLfYGIRRyZQRXC3OKMnytZ6LMDbRSuJyXeIZC/JCvwdDqmlr2WhGDlFhQ/bbJ+W65Aw9mnq48wNFJ6lkzvs6HurXTgHi+U8J0BS9fEUKqbB8Z9FuZngeNYe2EPwrd0GCRV1AI4hrG8aaaxjJqSKNDiEAobTZKopgtQ7Asd9wPnZtUGlqtQEZ88zmsb2/FDNO44uLdRjKnV2yR0septfrx8FZY1HmmBytE/WMPXEBKabT9BMeVFr+GPz6iz9mi+OIxcEQt5OtzwfN3NSe2kiu9jWqoZ/uzNnOJFR9S22WwwZ3AwYGWFXZCq+B1MNKpqThhFMfa+7jEMbskfBAQkKl3jpomiLxrWE126mJgnsQHOBO6ymvvgJIAE2X3h/nniQo/DKjS9IPRb3DmoseZ4SbmGsJlw3VcnOenTB7dmicJfTgGdKlBl10bix8HvIsFJKJSot6zFgvbh8wSOolTO5NCzMn3WRj4hoYi5waSWWvxpvT77c7tg1wbh3nJABEeSSu/gdz/tJw8VO3tcVKaUhizv+u0mtQeA99ePXsYrle/Nuv6CkXC41U8WiYu676fi5X X-Forefront-PRVS: 02426D11FE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(39860400002)(39850400002)(39840400002)(39410400002)(39450400003)(6666003)(48376002)(2950100002)(50466002)(42882006)(189998001)(68736007)(78352004)(2906002)(53936002)(47776003)(4326008)(3846002)(6116002)(33646002)(305945005)(7736002)(8676002)(50986999)(5660300001)(66066001)(6506006)(76176999)(81166006)(2171002)(6486002)(38730400002)(107886003)(42186005)(54906002)(5003940100001)(36756003)(6512007)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR06MB1639; H:localhost.localdomain; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; KL1PR06MB1639; 23:QuBCmThZ58WJNQuiih+MDwwrdCNXYvu/y4JW9Kh68?= =?us-ascii?Q?IEwsVqEW+oOBdPHtTuUeMv8Yl9V7RUBuFccadvhQK7mF0BsQ0HPeyhbeYPK0?= =?us-ascii?Q?GgMGvG8gnL/+qcBBjhXfOFPuziyIlm9CnRjPmJWw/7BcXFWn7GzssdAzCwq3?= =?us-ascii?Q?l6vvxTUy023UBMg/mKbenjLZeWXHroX4rCFm++V3pBV6Dfa+Opme0+Bd/H+P?= =?us-ascii?Q?cLE7pN4p8k44ZsOvfeX7q6/aEp8DHb4p0aYIzaA5m3K8bro17yGoLfHkXDf2?= =?us-ascii?Q?y/MN/NQF3aZfM4JggqcfGcLazU5NBQF+ePoKbPHQmFOn3k8SauR0qKRlw9p5?= =?us-ascii?Q?8LhS3rctRis2neG9+ClNdKiS8nmHXTYVnFxHIk7DeJaFUnzEKMOqkCQNftMr?= =?us-ascii?Q?OJHGYKaq6Uqo+bAbTabrWo2Npt9BCKUqkbEukpkMdYfN4YA4gUc/gEqhCRrp?= =?us-ascii?Q?5o0wuIlEnnCGCofrVR4PVYTBSY735OCucm75WQyStti4IqWXdUqMVrddYhk1?= =?us-ascii?Q?7Xn9mTjrOKkfSw8Dbq+y9HzebqiN6IHQZKmBLKCPbGmKiycyoHJpwyYJ+nDB?= =?us-ascii?Q?zBLIA9+Y0Ua63YZxwmZLAkZwlWO6hQD+M1CBfVcfkyPhYkP2crahnND5IWha?= =?us-ascii?Q?ZcAxThgTDCAIkWJ3fSJup+PpoAGSG52JPUBqZ5wYrFQ5NU1fJ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kcv3Zn17rA8Rc0OQNPH/72lca1WLkark2shQVQ7E=; 24:8RIve51vf1wA0uCUtDMc4LJJQBrIiK9lWT3fRgG6SnuQ0H0M2h6bmzriHfiObqq20cF7+M9tHWjoPcq3n8tT4dI5a56yYQFJeCisQjlHtKs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; KL1PR06MB1639; 7:rgYdrdAnNbD5/qgyCBGGzIJo9XqGKId63lQue1wsMAom8Glez8FCdjKxvgEY0VQoNmuPAzO9I7ZqTSuq9NU09/9kwKM4dRi2TAEzrbpbYBAp8T8GONP50A0eQqdZOsZ1rqf04n1FhZzUeS0pFWbjkPJBt+Egaq9isUPiSTU2xqGQ0eYeyAl7qIofRZXwyBPuB4atRXwNovvGWtYlhXRdbfh4bylKIGLtkJOVsE7ytp9UDxWZz4Mnyc8oi1brPfedaJ34pV3Y8wL9JcMfjxg+pu0qEypQBQEF7aaIeo6U1gHwAmk2PA/RuHUNAb25mal/n020gq7gwLryTHDxy91sQQ==; 20:wRG6qL3D9LlBcQtGXXNAsthajpBPiM6gRSyoNdGhuxht9x9dt6BV96ITnsn+l4xoPePwFOs4xQpc0De/YpaGcHxeuu7zKRIKoBvIwQtnvIQzMj9+Ca82H0R6vEbmWfwGOSbFqyJ15BDZUR6oHup29onr5zKBTbCf9uMSXuCHFe4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2017 13:03:31.5299 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB1639 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 patch sets hcd->phy from own phy context to avoid phy_get() in usb_add_hcd(). Since hcd.c manage the phy only in usb_add_hcd() and usb_remove_hcd(), there is difficult to manage the phy in suspend/resume. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/ehci-platform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index a268d9e..4ae27e9 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -222,6 +222,8 @@ static int ehci_platform_probe(struct platform_device *dev) goto err_put_hcd; } } + /* Avoiding phy_get in usb_add_hcd() */ + hcd->phy = priv->phys[0]; for (clk = 0; clk < EHCI_MAX_CLKS; clk++) { priv->clks[clk] = of_clk_get(dev->dev.of_node, clk);