From patchwork Fri Aug 31 10:32:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10583575 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 1DB3C5A4 for ; Fri, 31 Aug 2018 10:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFC3528724 for ; Fri, 31 Aug 2018 10:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3E612B783; Fri, 31 Aug 2018 10:34:52 +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 81F2828724 for ; Fri, 31 Aug 2018 10:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727864AbeHaOll (ORCPT ); Fri, 31 Aug 2018 10:41:41 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:54253 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727739AbeHaOlk (ORCPT ); Fri, 31 Aug 2018 10:41:40 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie3.idc.renesas.com with ESMTP; 31 Aug 2018 19:34:44 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id AC6027A54E; Fri, 31 Aug 2018 19:34:44 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,311,1531753200"; d="scan'208";a="289630541" Received: from mail-os2jpn01lp0152.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.152]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 31 Aug 2018 19:34:44 +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=0rLM+bfQJNAFwvvpowk9opqtB2Fdj4+8aKFZdkUGR2M=; b=kXmMOLmjGAZPJK1vqLJBh7UQLgsfEzxzTnyUxR1UcrFIe7Ye+pbEz4au9RqQAcShxZQ+XLUdE1HayPN8HDNztwY/ouMFeVn1ghU8qeC69firo6abTaACCjz6Zvwff5fcnLRItEBj2o21BjRYS1q/ae9MybPjqbmAJ/Cl4l0wUJQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSAPR01MB2289.jpnprd01.prod.outlook.com (2603:1096:603:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.13; Fri, 31 Aug 2018 10:34:40 +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 v2 1/3] usb: renesas_usbhs: Add reset_control Date: Fri, 31 Aug 2018 19:32:57 +0900 Message-Id: <1535711579-15169-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535711579-15169-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1535711579-15169-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYAPR01CA0073.jpnprd01.prod.outlook.com (2603:1096:404:2c::13) To OSAPR01MB2289.jpnprd01.prod.outlook.com (2603:1096:603:1c::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3588db67-8df9-4a02-5f5b-08d60f2d5bba X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(8559020)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSAPR01MB2289; X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;3:nxWQZZe8Z7nz/LyGrfVHK6bUyT2Xqfp5QoqLCf/EX/cUrS29DDq1npRMUdufrk6md9djRP7vE+2H4KEb6Oy4fS76i7yaZxQb4B9rfPjl0iW9U3VzVxtRPQdspVGg3IwvMTAfq1o73Uaz+C/e9zEc9kWQYfak46PxS/2fdTMziFBl8TQBpqNTGlfy7Ge2lBCDOebdbHYLkjwQPZIhvj1LZPrI1ZLIC0+5PRjzszWlICJs4eVa+5DiqtX+WnYphLbL;25:ZP2Ov/nFykSo/t0vhNTipqZy42YKnL7Zq/HIj01rjWX2Hcr0YvGzJqiKardQJYu3ZrcGMQqydRaRUxjeIUxkdHnZjIgjGFpLoxjFtsZL0/In+jrprtHj61EvaLiI9MtkAghuOML8r11WTcjX4y6K+D1m8qeeHXKUDV/37EywrNXH3Wi8OmWnkKhnqbfO+/521REVcNxwyKTTQ5eyBax2kDHH5qgemPkPlskFGtmL7ryT1YUyRiGyyeT7srOPG7b9yxdPn4PIjD/NVrPslh/VI1osPFFE+FlAeovxJLGGwgVv3dBtJIISrrw9ZdyS8VhDC6yLWocRz2FPpUm2wMTFxg==;31:/VBNK50NKLi5wx1Ix7JHgE6U29P/kl3isoIw7E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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)(5005006)(8121501046)(823301075)(10201501046)(3002001)(93006095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(201708071742011)(7699016);SRVR:OSAPR01MB2289;BCL:0;PCL:0;RULEID:;SRVR:OSAPR01MB2289; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39860400002)(366004)(346002)(136003)(376002)(189003)(199004)(446003)(6666003)(26005)(3846002)(6116002)(50466002)(106356001)(5660300001)(16586007)(105586002)(78352004)(6506007)(316002)(386003)(2906002)(11346002)(25786009)(498600001)(956004)(2616005)(48376002)(76176011)(7736002)(476003)(50226002)(51416003)(52116002)(47776003)(66066001)(6486002)(8936002)(305945005)(81166006)(81156014)(53936002)(486006)(16526019)(36756003)(4326008)(8676002)(42882007)(107886003)(6512007)(68736007)(97736004)(69590400005)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSAPR01MB2289;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:0;A:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;23:6EaAlqBrgagdjBTeZW8JcDGxbGV6ieFWT2FjwzUzr8ZP8IZ96sKbNbeT6NcJIAOFir3TineX8+d3vM1ujQ4JfNTdfFjDals2GH2ul9ywDN+dvxM742R5iLTTMgaeAwtiL0A6cexv5XCDvBunqXMFqUiR/sRa5VQxFEeTchzbNxUOb68Eygr8joBbsH5POay6iC9j82Nm043lBMNzYBKVDbdYdsqvc8Hvcc+jDkygD9hCu9QknI0qFIPEJ0O5AsS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D6BOLKkNK92Tamm4ufbsEjgLyyX5o0M6niUc9zHKVZLYA6CmUyrwp1aZM+oVgGfuD/04yxHNGHUk+qPR1auq9jTL6mjqe+nCFVY/3aIy7LaPVQjzQLn/g4Hms14OqnG0ObMHbLAecO/AS/tJkTqnlOinPwQ/5EWAEgbUcesQ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;20:uuc7QJoNlQx+EnBrDGxqbTeTrKeP1AmYpkbdAZPeD3qgQiGo1awC5JlPjxZBDcktRSke+h/lw+z8aTVvaMh3ZS1x6xniRlxi9p4wtskvaN5PVQlCPd/JtredGtDpBzpZ9ZS8m1mHGthqoBJQsEY8JFnfc83qG/PCAmvAWJEMbQ4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 10:34:40.4826 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3588db67-8df9-4a02-5f5b-08d60f2d5bba X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB2289 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP R-Car Gen3 needs to deassert resets of both host and peripheral. Since [eo]hci-platform is possible to assert the reset(s) when the probing failed, renesas_usbhs driver doesn't work correctly regardless of finished probing. To fix this issue, this patch adds reset_control on this renesas_usbhs driver. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/common.c | 12 ++++++++++++ drivers/usb/renesas_usbhs/common.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 4310df4..1d355d5 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include "common.h" @@ -574,6 +575,10 @@ static int usbhs_probe(struct platform_device *pdev) return PTR_ERR(priv->edev); } + priv->rsts = devm_reset_control_array_get_optional_shared(&pdev->dev); + if (IS_ERR(priv->rsts)) + return PTR_ERR(priv->rsts); + /* * care platform info */ @@ -658,6 +663,10 @@ static int usbhs_probe(struct platform_device *pdev) /* dev_set_drvdata should be called after usbhs_mod_init */ platform_set_drvdata(pdev, priv); + ret = reset_control_deassert(priv->rsts); + if (ret) + goto probe_fail_rst; + /* * deviece reset here because * USB device might be used in boot loader. @@ -711,6 +720,8 @@ static int usbhs_probe(struct platform_device *pdev) return ret; probe_end_mod_exit: + reset_control_assert(priv->rsts); +probe_fail_rst: usbhs_mod_remove(priv); probe_end_fifo_exit: usbhs_fifo_remove(priv); @@ -739,6 +750,7 @@ static int usbhs_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); usbhs_platform_call(priv, hardware_exit, pdev); + reset_control_assert(priv->rsts); usbhs_mod_remove(priv); usbhs_fifo_remove(priv); usbhs_pipe_remove(priv); diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index 6137f79..bce7d35 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -10,6 +10,7 @@ #include #include +#include #include struct usbhs_priv; @@ -277,6 +278,7 @@ struct usbhs_priv { struct usbhs_fifo_info fifo_info; struct phy *phy; + struct reset_control *rsts; }; /* From patchwork Fri Aug 31 10:32:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10583563 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 AD6C517DE for ; Fri, 31 Aug 2018 10:34:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B5902B780 for ; Fri, 31 Aug 2018 10:34:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76CCE2B783; Fri, 31 Aug 2018 10:34:49 +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 138802B780 for ; Fri, 31 Aug 2018 10:34:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727782AbeHaOli (ORCPT ); Fri, 31 Aug 2018 10:41:38 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:58991 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727294AbeHaOli (ORCPT ); Fri, 31 Aug 2018 10:41:38 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 31 Aug 2018 19:34:44 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id E9A3E7FC4F; Fri, 31 Aug 2018 19:34:44 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,311,1531753200"; d="scan'208";a="289630542" Received: from mail-os2jpn01lp0152.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.152]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 31 Aug 2018 19:34:44 +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=TFyy1VEpe2LiAY5REWStXCCC1eE4cfHlFFe4jqJKQbs=; b=EGQiYxcHgXQ31vLxRUaogeO/4iGP5vl4dqiqHxYpMaMRbN9Az38SSHOB6iXLylv8/w6pj+C5aYKuJManAxKYL4kw/1KyITizj1CVKoVg5Q51/2TgawnLE1Brbd0KaieN8HGbZtOCwYvjWlpk9jRMMjECO/wz+OxC0n4VsQIxYRA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSAPR01MB2289.jpnprd01.prod.outlook.com (2603:1096:603:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.13; Fri, 31 Aug 2018 10:34:40 +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 v2 2/3] dt-bindings: usb: renesas_usbhs: add clock-names property Date: Fri, 31 Aug 2018 19:32:58 +0900 Message-Id: <1535711579-15169-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535711579-15169-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1535711579-15169-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYAPR01CA0073.jpnprd01.prod.outlook.com (2603:1096:404:2c::13) To OSAPR01MB2289.jpnprd01.prod.outlook.com (2603:1096:603:1c::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 001ec0f7-549c-40f1-88e1-08d60f2d5bff X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(8559020)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSAPR01MB2289; X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;3:REgydXPfKUxY6hcgthyFgWG4NqEzZcNnft+m1mxiGOie1HaEI0otDxlC+7zReG6mdK/R+lo7SunjgKwkM+EmwIh57ACNL26uRnc1cLVfB7YBHnnhBaqI00h6q/8Lw4jMyIKPoMyRONZ5fN/KBUd3xEw5AsAbJmrjS4rbUcpp6B1Eh9Eys1ExGQywRGJ7XyHBQK/fswsRBeiYKGyddKiTz+AK8HCoxeqeHhm3/CGicqyjPs0eIgxZVA0Y6O6/F3nY;25:7yutHcENivyUWCfOzx881qlDPhXUF0USUHKwmQ6llAivIbWDzBTfz7XSCAbWENah26ahege0E/kETZel16nEharWT7u+3kqAS2V1paEqT0miOpWm7a4pa6YjSMsXIObUXW/1sekwiBCTx9HYzPYSvHVtbNy9MW+ANT5MlZS3zyxb8/KmU/hFyB3YE78xH70Z/62HIXQ2IA9y6IE6Ag2paHs62Vc8J71y70PsMooEdjzRObG6EL3jAUgvP0G4Pl1W0QJgDSbHXsimJBFekScFK3Uzyai3YCufkzkli+gVqTmLgOK49iJ8fvs2qHWVcP2daI9CirWGay+5oNIynwzN6Q==;31:XI+j8yyo+k6yuyqIA0d9VEzQbgF5wn51i0MJA6GtfzxvbTMWPUGO+7Rf2U1OQNPBCMgkrnhT3WyGwFEcom9vHkCePUKu6nH9RLAEhf253YoEaLDd7xQRvz4JYl4PYf5aCkYbNxGkXNSu2AYXnp2gjpE3+AexrU/sPp8rxNgUJrn37119pQzbQIMb0jd1BF4sLLzCzM5jsiD8bZwzwq1651mRkRUMsUfpCtA/SJalPb4= X-MS-TrafficTypeDiagnostic: OSAPR01MB2289: X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;20:++KgwNDHhbPDT94XKikBkkcxwiqUTwkaw1TdlZVqxfvBliQfbNL21OLkdaBM6saO8w5VoTqfZ8nGMrTn2u2yC3f/y+REe8fosp70+dSW7XuE8VEz/JTFxSHBjEW1ITE1zGMeF9H/Z+KEk891CDqW8RENvPtYKkFzTtNmhXeaEGe5alyb/D4J7YTMguj0t54XQCsinolGdtYg7f9EEXIaRsagWqkpb8siUDiMdYlHMFrmjpY36crlwUuPvqg2fRwG++5XXpk8Tsm3ldr0HQFzvnUFb9jvmoguswvsUA8vSBgDOL/3bbqrdabEn8PBgGJC0qsdRIOgEcuUipmQBIDqAyE7rr8728RWjf1tYybUM9Z9fI3nNGhAh8odw/XQiEBVuJSWFa50v4GRxjuj8Yy7dZqRkju1AEVWt+vR+uczg0MH8jQR1XP4vSnaUahIiaEKaAwhfoHTiPdLMaRgSpu2DEM66KHbmvMi9g5enE3tOkF+zZAvkzvuPXh9oX2VCZaH;4:upcRynekSFaiVQyaEsZO/mVlpK/Xgu3sVX5KKm5ZgB+lYvxQP8KLHair+lgeyZIPWANMrVEz3eiIwpiJCDEuQZYJeyYVOB+O2vxo0YuT10Cycz55sgMzP+biBI/yObk/URCPz0xexRRK64FhR/FPCx1i+//wkRt3JEGhsTI7gS137eo2CATj0I/JdsvstG3KJKX+Qcc3UV9r5cmXQstJEw92H7BH6+xfRDC9L/e1XYSUj9Y/nAlCi2iyI/CaLawXF1fTCtjMjYQ5R45Nx+FNeQ== 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)(5005006)(8121501046)(823301075)(10201501046)(3002001)(93006095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(201708071742011)(7699016);SRVR:OSAPR01MB2289;BCL:0;PCL:0;RULEID:;SRVR:OSAPR01MB2289; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39860400002)(366004)(346002)(136003)(376002)(189003)(199004)(446003)(6666003)(26005)(3846002)(6116002)(50466002)(106356001)(5660300001)(16586007)(105586002)(78352004)(6506007)(316002)(386003)(2906002)(11346002)(25786009)(498600001)(956004)(2616005)(48376002)(76176011)(7736002)(476003)(50226002)(51416003)(52116002)(47776003)(66066001)(6486002)(8936002)(305945005)(81166006)(81156014)(53936002)(486006)(16526019)(36756003)(4326008)(8676002)(42882007)(107886003)(6512007)(68736007)(97736004)(69590400005)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSAPR01MB2289;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:0;A:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;23:dLXhKUcLkB3p6np4ddh92tcaoImxvd1iyemoOefDskvpCwoOLqoZJV1RYoUO3RoPa9hlRr12icD93xXJQb1mjoLsUZpD2DI/5l7HXFzPk1hK0XvpttVzUDaRPy0Uc4xp11MyYVI/v64cbs9k399EAKXXJ2gKksA1SVAJVkHjvVCsknmE0u35uatfPC463osuVCebf0a/cNKGGA6PMGCAyh6udZtRoFDWmSpdbHj7giH9wd1KorHeYq+nFATa9ZO4yg6LdxIdjL2Asm6bhgsYUHwMwLdbQ6hmIOQJgHDgiFsTL8JEylu4/DE7H7UztFDU/MGphqpBymwrQJV82EnwizGynfitJywHkfdoux2qmSI4kNEe5E+v6dOT3wTo3S7jZCmjIPr2Ygi2qkBx3VlR0S4drgqeA0wnhzcde748BnZJDYGh8HqINU/U497onY9zNvdfFu2d4KNwfnRu7OK7G+/MnDa+nIGLAkdDFOEEMsRua5/4SVaNLtT9MQy63XWYvS8dtqhFAXp+yCzXmwCvHBXBHu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kd3l3OAensEjWYIUslLhy7LztrvTeFmZssePh8= X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;6:3bewfgrhxtQKQDC5FbwQjAjs3FAAqzIwbrBj91UPHNXow/CPqL20aE5m+TS9NqmwMZPwvuI2w3kS19aJPC94DPQ0JEdWLuFcC4vmo/IX5mWPC371s0jnCt9GIO0UMrgP/JAKGSSg+e1zXqKS/wygk7gWMU9zuvKrs+emc96S0jcXMoSR9Cre47VE3xP3dVZ8G++0Ox4ZeL42JZsZMturliQTBzcwagYCAWmfNTSuV/l5zeqifDUx26PFNMAd5+kls5bxBzg1SBr2VsbbHDgGhj9OIYg+G+RedWVI7ZqGCPvuVnhcGNQnBMfpZ1SVXmevtekEAUkw+NgbFo53BfgWzAX7waj149mGrebbakaTNomS/u2G103Ltlmoe8yJ9gG+FHxtSEhkSl9epilnhzesvK+mL6WYLLuoVaJxvdRI5NS6kpYMHP0DOdU0NVHcHv5lBxeG2WVXgvwbKHg8nFh9bA==;5:20I5l6UPEoaFJdH45bwV06x4IsKCuySNmGU1zL/HMHwjiKJsw0QGs9mX8yOdCbpVwp5IBQrZLblqDf2My4DTTLI5mMpJQTlqGGPjURLxTBRwwl5UZ9bLDXBvdYs9FVbh4AeN0LbkdVqF+DNkDFswDM/wmPVLSyYd6Kd420R9VLE=;7:sJI2fx85WnN3ovbR1PhIjRsbULV5Cdv3amAnQwqSPbH4EfqYWnzZgxSmQ0nNC47a/x7wVtkl1jT9n1z3Y9r36NslDkx9qgnyRr0aoQDM7K0feksxQS54ljzZ9mAumyZZcrPFTNULTvM5OQC3QOgo24MrgWrhrhR4R0cgoQF4iXnfzO+BcMBAkku+z7bYa+umWiUi1fHiVc1tZcrcoDrQFPE49yEOhOwomLu/VHpyZSROLyhP2QOYR6X2f/IwMd8G SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;20:fqKXA/VzIsf+PJ1l0SogXw6Ebd2ao3rVDb4klf7YrT5KG4U/cOtcHc/OK7sp5tidKLS0xeaiWjw1JZXtDLxCz7Tu++Icp3lzPj99wNoLYWE8exqxf8gL7A5unEUwy6f/+4B/48UP8msq2bUjSZpeq6cQjlDZqxBOkCvwxWF6GKU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 10:34:40.9202 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 001ec0f7-549c-40f1-88e1-08d60f2d5bff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB2289 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP R-Car Gen3 needs to enable clocks of both host and peripheral. Otherwise, other side device cannot work correctly. So, this patch adds a property of clock-names for R-Car Gen3 as an optional. Signed-off-by: Yoshihiro Shimoda --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt index 087140a..a8fa3ec 100644 --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt @@ -37,6 +37,8 @@ Optional properties: - dmas: Must contain a list of references to DMA specifiers. - dma-names : named "ch%d", where %d is the channel number ranging from zero to the number of channels (DnFIFOs) minus one. + - clock-names: For a "renesas,rcar-gen3-usbhs" compatible device, + "hsusb" and "ehci/ohci" can be set. Example: usbhs: usb@e6590000 { From patchwork Fri Aug 31 10:32:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10583573 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 BD3D617DE for ; Fri, 31 Aug 2018 10:34:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B47F2B780 for ; Fri, 31 Aug 2018 10:34:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ED192B795; Fri, 31 Aug 2018 10:34:52 +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 1653F2B780 for ; Fri, 31 Aug 2018 10:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727879AbeHaOll (ORCPT ); Fri, 31 Aug 2018 10:41:41 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:58991 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727360AbeHaOlk (ORCPT ); Fri, 31 Aug 2018 10:41:40 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 31 Aug 2018 19:34:45 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 14CD87FC50; Fri, 31 Aug 2018 19:34:45 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,311,1531753200"; d="scan'208";a="289630543" Received: from mail-os2jpn01lp0152.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.152]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 31 Aug 2018 19:34:44 +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=Eqj+AukKYkt3v39Vq760dXrBOjn1KdV9gFF16cezPLs=; b=JCByXA4UDrnKvjfPcR2Ly6p+abevt9ZZBT8AuYZt46xrQ6QLVpaHktl3+2jYodU1WlIU/EUtaIqhSulINETojhkPKgX57TF82Wg0TRP7aKtJPZNyZPe96ZPEFr6hrl+h/ufsvsE1fw+D9Finxfp/iByBkOUfwN1VRegM9oC2NUg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; Received: from localhost.localdomain (211.11.155.144) by OSAPR01MB2289.jpnprd01.prod.outlook.com (2603:1096:603:1c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.13; Fri, 31 Aug 2018 10:34:41 +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 v2 3/3] usb: renesas_usbhs: Add multiple clocks management Date: Fri, 31 Aug 2018 19:32:59 +0900 Message-Id: <1535711579-15169-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535711579-15169-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1535711579-15169-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TYAPR01CA0073.jpnprd01.prod.outlook.com (2603:1096:404:2c::13) To OSAPR01MB2289.jpnprd01.prod.outlook.com (2603:1096:603:1c::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: add43085-7922-4e14-4fe1-08d60f2d5c42 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(8559020)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:OSAPR01MB2289; X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;3:zyUdmhwviKrwa1OccKIMkt4FNZhTxpr4VZsyYIWARuOEcGWySXDhDn31nZxjou6avShNmOw/5GvPt4mT3WKXaYItl9m9zfW9Sr/HjYW1qNyQQsU5urqI7Kg4aw2z4rwGRtyYiPtF18xjf0hoF8SryDbRTVED68iN09hydEbPvXbppi5VgZZ/ndx+GqYZnvvfgsFI+Do6hk2qnhlbyL4IlnERxahbMAISd62IxOOiFdVDCCf8hgVhFhOxFfA2HNVX;25:s5Q4XZdl74dp0XicwIQYWGdREgTmvGBA9VL57zYvGQMBhQfdEwtJUUgFvKcYiFbEihM7tlvnoYTntFnOW69jzjTvrek2SAf//LTv1+k5RmGXt4420bR7f6djNuZbvGYOoh9IIkXLkSYjVb7C9maTGCEv67oKahxNVT1Zkq0H160oCJQKEs3vl9bADdSlqr5P9jwdP7FoIH11sqK36wQ+CTm60+DsMlCjNa7c7BTTO5mJu0/i7STNbTXyf2cKMcHVQevntx3IjlfgR3aCX2umTnGc5cMtAfcAH+reUjWvd8CCzVV0aZdEdQ7q93VW8qtLeb9wrnVkH2Lli68Jg/Gtvg==;31:oTAx8deqc662a4oWWmMDR6Jys7GF1lkwGGBfeoO7p9zRjGFS+wVGUzmE1wrRP44jApjuqEeNg8yM5tDr3V2IfXiQpBI09G+KJkjwDpF4XzNroYmQtzfCOfTlHE+S+1MiDe9xqBHP54/ALH6lzs2wko0kx3Caz9ds0xPxrRTV2+0DeijBZ0cZQp0M08NzDFQre+bVp1yPL+qql6PUjw8cD7q7qCRYyVNYW656wrU9r9k= X-MS-TrafficTypeDiagnostic: OSAPR01MB2289: X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;20:2BNccCdlvTuJMSc4cL5CIjT3WZTqB3kP0leRpFA5TFZEPa5Xvp5E1h5PAlBwkpuiasRMLfx47HHdC3Pq5IhKBPUCoPGZlq6C2Y7SE4EHC4DxjaaDiTeHl9lvT4G02QeigB9LCog1afERpztXfn4+vI2zUUKD5IWDCWKc4L2pXRGes6YDGm0kkmxT5dF36dmiXKODJNqTcK0OlcIR0wV6lhHPymeieNmfCmhT0osckiRKVSmHGMwwYigOpMoFcloO44fz30bUKRH9Tjl1QF4Q1ykXxXIzr1FcuUqt/tJhNCm+8Ucy7g0GsAi5fl4Jva7h+Cu+rP+/15eZkMvcZuOGbEfZguq4j3efB1rkff8yf/EqMNiDYruAUFZHYzGF/kC4sCKTGHXkUag5fGLzfy+gQfFl/z1N/NSKAzVTIV3MxwSU0v7SfFWXwuq8Cdoo55PWvpvt8hY/81r9tb9rNOXX5nZF8b7E60B0ZqjJhVpXLYoeRjAr0/dLPgCfX9LV//Q1;4:XrjO504FKTAj5rmPBdTq/LzLwMIcVwlhzbzXDJVzznjYvV+P8awLV1Z12yuib2ChiBBiiWjrrPuA41mhOlUsIbXFe4ye+Cgl2zWeY6qVgHUyP7pHtQYqnPmZniefzz997yWDspYiSkwAqMaObil1clR6GAI0hdvsQp3+sgFAWb9Y+ssjufah0MjqHBetGmDvXA9dO8wX+upYU+83yxqia0U4UsvxIPXeCJOVBcoz6IL1ZmYANBBxXj0u4UWGD6w/je4cLbV/vfRHQHKP/rH6uQ== 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)(5005006)(8121501046)(823301075)(10201501046)(3002001)(93006095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123564045)(201708071742011)(7699016);SRVR:OSAPR01MB2289;BCL:0;PCL:0;RULEID:;SRVR:OSAPR01MB2289; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39860400002)(366004)(346002)(136003)(376002)(189003)(199004)(446003)(6666003)(26005)(3846002)(6116002)(50466002)(106356001)(5660300001)(16586007)(105586002)(78352004)(6506007)(316002)(386003)(2906002)(11346002)(25786009)(498600001)(956004)(2616005)(48376002)(76176011)(7736002)(476003)(50226002)(51416003)(52116002)(47776003)(66066001)(6486002)(8936002)(305945005)(81166006)(81156014)(53936002)(486006)(16526019)(36756003)(4326008)(8676002)(42882007)(107886003)(6512007)(68736007)(97736004)(69590400005)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSAPR01MB2289;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:0;A:0; Received-SPF: None (protection.outlook.com: localhost.localdomain does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;23:I6F91SL3X/z8LwJRzRNA/1F0IYH4HVcgjdj5FJQwBJ22Q0xkqlqkv5uAEzyS8slZXC6sJpWuBBNtt0iIaxj7xfvox2u0UHgsOh3E2ldekuNRVRCv+lVDXUdB5IJ44gMHdNgaHlq8I8Lec7HMEgS63MMC0w9Auk2XfR3WNt8Rr2CsHoh97AYYDJS7QcqAZyL56onJzSSsDgLKsic0jJ0PGNEUtZJ3WwNCg5kyxRULPk8lpGUpXb6F28ppPMxZb0slyHMAItzenyGmOohGWrp/PfqxJLiGVhC9rli/4K/rqNTHakVBxQ91WMtvod3nSLJSZqDPfCXQoCi449S3zC8EPW5UIdkBl/tSeaHfBUJmp5SP6/vVnyu+V8aXM1MRNjq8m5KqkkEk39UONM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e4MoIimhkKqn6ig5xxkqjz3n5HO2ZW7VzrnuWmCv3GhKb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSAPR01MB2289;20:0WnbmwiQF4QrAHESUXBISepuIFvIscEcdtm3cxaCNFz6PtaOcVB0hFP52sb6aFLZeJQIp1RlqsI3aIT0/OCKXkjEgfquQxO4JMMgYQ8xnHzaVZ3lr6TbY0kVp9rvvnPj1ZZcWTXqqqQO1NL/ZTojL+L7woaSgJzcEVTe6AsE5wM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 10:34:41.3579 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: add43085-7922-4e14-4fe1-08d60f2d5c42 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSAPR01MB2289 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP R-Car Gen3 needs to enable clocks of both host and peripheral. Since [eo]hci-platform disables the reset(s) when the drivers are removed, renesas_usbhs driver doesn't work correctly. To fix this issue, this patch adds multiple clocks management on this renesas_usbhs driver. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/common.c | 35 +++++++++++++++++++++++++++++++++++ drivers/usb/renesas_usbhs/common.h | 3 +++ 2 files changed, 38 insertions(+) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 1d355d5..39ed714 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -5,6 +5,7 @@ * Copyright (C) 2011 Renesas Solutions Corp. * Kuninori Morimoto */ +#include #include #include #include @@ -336,11 +337,26 @@ static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable) { struct platform_device *pdev = usbhs_priv_to_pdev(priv); struct device *dev = usbhs_priv_to_dev(priv); + int ret; if (enable) { /* enable PM */ pm_runtime_get_sync(dev); + /* enable clks if exist */ + if (priv->num_clks) { + ret = clk_bulk_prepare(priv->num_clks, priv->clks); + if (!ret) { + ret = clk_bulk_enable(priv->num_clks, + priv->clks); + if (ret) { + clk_bulk_unprepare(priv->num_clks, + priv->clks); + return; + } + } + } + /* enable platform power */ usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); @@ -353,6 +369,10 @@ static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable) /* disable platform power */ usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); + /* disable clks if exist */ + if (priv->num_clks) + clk_bulk_disable_unprepare(priv->num_clks, priv->clks); + /* disable PM */ pm_runtime_put_sync(dev); } @@ -620,6 +640,13 @@ static int usbhs_probe(struct platform_device *pdev) break; } + if (priv->dparam.type == USBHS_TYPE_RCAR_GEN3 || + priv->dparam.type == USBHS_TYPE_RCAR_GEN3_WITH_PLL) { + priv->clks[0].id = "hsusb"; + priv->clks[1].id = "ehci/ohci"; + priv->num_clks = ARRAY_SIZE(priv->clks); + }; + /* set driver callback functions for platform */ dfunc = &info->driver_callback; dfunc->notify_hotplug = usbhsc_drvcllbck_notify_hotplug; @@ -667,6 +694,12 @@ static int usbhs_probe(struct platform_device *pdev) if (ret) goto probe_fail_rst; + if (priv->num_clks) { + ret = clk_bulk_get(&pdev->dev, priv->num_clks, priv->clks); + if (ret == -EPROBE_DEFER) + goto probe_fail_clks; + } + /* * deviece reset here because * USB device might be used in boot loader. @@ -720,6 +753,8 @@ static int usbhs_probe(struct platform_device *pdev) return ret; probe_end_mod_exit: + clk_bulk_put(priv->num_clks, priv->clks); +probe_fail_clks: reset_control_assert(priv->rsts); probe_fail_rst: usbhs_mod_remove(priv); diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h index bce7d35..6e7c5f2 100644 --- a/drivers/usb/renesas_usbhs/common.h +++ b/drivers/usb/renesas_usbhs/common.h @@ -8,6 +8,7 @@ #ifndef RENESAS_USB_DRIVER_H #define RENESAS_USB_DRIVER_H +#include #include #include #include @@ -279,6 +280,8 @@ struct usbhs_priv { struct phy *phy; struct reset_control *rsts; + struct clk_bulk_data clks[2]; + int num_clks; }; /*