From patchwork Thu Sep 6 05:50:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10589895 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 3F79E14BD for ; Thu, 6 Sep 2018 05:52:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EDB62A382 for ; Thu, 6 Sep 2018 05:52:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2254E2A55F; Thu, 6 Sep 2018 05:52:04 +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=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 952BD2A382 for ; Thu, 6 Sep 2018 05:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbeIFKZr (ORCPT ); Thu, 6 Sep 2018 06:25:47 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:22018 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725885AbeIFKZq (ORCPT ); Thu, 6 Sep 2018 06:25:46 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 06 Sep 2018 14:51:56 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 410C577F9A; Thu, 6 Sep 2018 14:51:56 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,334,1531753200"; d="scan'208";a="291703405" Received: from mail-ty1jpn01lp0176.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.176]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 06 Sep 2018 14:51:55 +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=nxGv2HtH7vaKCcyrt3CGYCp/PPbuSemc114fmhT+cKAvbglUCnogft5t3S4VBCuUuQ7Ii/9q31FTxevb6mevCa5u0fhaLTrnSKBzKVbhN76rR3awZCG9Q8sNg4YZCpBsUbT2wIsV9R6W1o4ZVfuCZ0Kl69nO8h8iv9QyfOaK4Y4= Received: from localhost.localdomain (211.11.155.144) by TYAPR01MB2304.jpnprd01.prod.outlook.com (2603:1096:404:8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.16; Thu, 6 Sep 2018 05:51:53 +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 v3 1/3] usb: renesas_usbhs: Add reset_control Date: Thu, 6 Sep 2018 14:50:12 +0900 Message-Id: <1536213014-1325-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1536213014-1325-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1536213014-1325-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSAPR01CA0158.jpnprd01.prod.outlook.com (2603:1096:604:d::26) To TYAPR01MB2304.jpnprd01.prod.outlook.com (2603:1096:404:8::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a9fe473-5030-411d-96f4-08d613bcd8e1 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:TYAPR01MB2304; X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;3:Xnyf85w1YEguE6UaMArBcjBeKk2jwb8Fvp6rCWqvTv23EOUjYkxlUpqpq7Nn+xmqRTKOlAh5REEQgMoBQhodNNJLqJk7RPZR5O5RSXvrS5y5FSH5ggMWW6ECyaz571Y069S/jsInntEG8v0rJj4fKMz/ZyvmNQI6KiZ4oa5JkPowFzlTHOkTYeFYOtaW3SHgOI8SV9RQggesgyYf8WUWmlyKWHcsUWHihZ8hMy/Nido0hi9te1yZi4EQXfgtgtBM;25:uXH1IQ0p27Q0632QRICZevhdpdwRP/WoSiLZ45b4+4iUMolWnO9D6MemjP41qGQWwiSj9MpG9VtpPTvyZywRG19UREeGV9UavPUSDG0XLkXMWemFB4BsfBRF385uCDhTYg07vvX7JzeetNSOrAHeK/+zgwwuN3jVWnsIeHMuIGz8wdHKuJCNJZrKzL3BBrLU6bxMqi/GwCYJ3ZQQkuGl+8SimbKrIrM4bshcRq6Mw2mePzIz34waCMiicFSHWKMxVDqUhRq0XRokE/OziZm7xfukfTTr0B+EM87j8++LozX+XMae3oPs9+GC2RejoCHhFFmTh+etcbEG9phVAEzm3A==;31:IMXuuy9jn8PeiT5v1LSMBvloxXE0kjLsKGomNODqf4xJguziVlqRhMh8r3RLnBVbZq8J6+t39Ct54vzmK0SPrMfcUVoFqJ47k4ge5zwOq12tnYlY59pfUDwjoxKyaXESZpoapr2e1h4493yvQJXwXP9oF4SqvlxwAmjONT+VGLKtD6+HD/J4STwbQzIFrRX6AODFES6CEviRC7gfCs/zHVboW3Amk2YVO2rkYWwA6m8= X-MS-TrafficTypeDiagnostic: TYAPR01MB2304: X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;20:L3tXfuJlvO2UdD42OgkR2ENns+DX472bUzZww5+TG2sjgw6Z80GjmrHbMQQkRE3EQLb+XngK71VtwxzwMl4t4b+zNnG5z/bDoIqBhllcfbfWG4Re+XvhW2fPXGfP2ukuC8AhkDYMORNUQ1ItquQQQISWvzUq1TxvUuBEW8Ncq1ZewDYHoYnNOWAJRiOH80k5/LSC+Ihv6bKPjSLPMziwRdFBXnrUe6HrWYRprzFrbMCE8g25sLrPsLg7NJHUEwwEFhSCZmgYnC+qkK/HYDURGFH4yMLxPSBpZZwuoKYkhzbWQpa/N6ZYgeM3xFuKaFj/Jb+Cv9+6uy03USzesIH20KGaa4wJSctDswBzpU8VT6nNuH+cFhOypS4ZzxojqHJZ/KUFkgnuKLTLO4cQIsh1YCs/fKuPKnORJOJs768Ddkq3JjugwzOF3Z4Hr1vhTsn7weK5Oxq5FIidpWTeN9txS3nB6U7k8dfa1Yawfx4UzpnoAejjxBR1pypiUt5mJdin;4:fstLeMXYT+pgrem6JjmXevRJfjlL/xQLur+ENdx0yhyUPxkwSK1rpSXDXQsH0fJN/XZ3LeXAEhniwIP1fo0dUFXVh62ei+sQHnDPK4klbGSfOSCc8bPeOAgSJJxPYj/0YGqtVj5gZRPNOUWxkQpAYKCsCgSXlBWm336FxO2WPxUd7q+0/+1APC4TnMRFxpNyHufLz3nkXCo8qkQJ4mLtukjojVnW/QNljcQUdZH9Z2IESM9kDs5+b36Fg2kHhdxqgjhKeTKRBZAn9srounmhGw== 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)(823301075)(10201501046)(3002001)(3231344)(944501410)(52105095)(93006095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(201708071742011)(7699016);SRVR:TYAPR01MB2304;BCL:0;PCL:0;RULEID:;SRVR:TYAPR01MB2304; X-Forefront-PRVS: 0787459938 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(346002)(136003)(39860400002)(376002)(396003)(189003)(199004)(76176011)(52116002)(2616005)(2906002)(106356001)(16526019)(476003)(105586002)(6506007)(386003)(498600001)(6666003)(6346003)(51416003)(50466002)(5660300001)(3846002)(6116002)(68736007)(26005)(316002)(16586007)(25786009)(78352004)(66066001)(4326008)(107886003)(7736002)(305945005)(81166006)(48376002)(36756003)(42882007)(50226002)(47776003)(8936002)(53936002)(11346002)(8676002)(6486002)(6512007)(446003)(69590400006)(486006)(97736004)(956004)(81156014)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:TYAPR01MB2304;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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;23:MaxBB5lIhhZJcYQw1CG+gcw3yUI1z9xPu9mz6GGn9SkSSXS/sPADlwVmuq97+p1aVlpSDB1J70AjuZWtbAa7xHjj0kdYdLONOap4Zo0vkW01NBxsaiq1CWmNYT3R/NgGaqtKq35lJuAo/SFBrfT4jpPhnbyziFDBpARC0NPDwBcvoF1T9hsFAGlzZ6uqTLX0UYqSv6ZLzLKpRMFDQ1Bx8RSkaw4CCw/wITy85bJdGX5Jrf0+1b9Ad3SlEpvlwnTZzJAc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GWAdqJpuqScsmwKnrTycq1tqPEOkbmJ7RimCBS0zeHtkCVhJVZ66eGQS4CP+d+lE1CYdbutZhLX3m/krV0kdJaiLcxGPWgxQPIkx3WSsW89xcZv/iqJmvusFR7iSULRkg7Vn22QKwQj2W8pa25j5l2xsEW6sfmxQuyT3XdbZT9gL3g7szUFtVN7OVHG3BRgOa2owjlJC2UNkVnxBY30uYUi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;20:yRVmZAO3RSUfxAPzC3TU6Kkr35Td1rqdpdqrF0DCdjyWZnL++xFCQe9o6iDBvS4uvbRnUjj3scRZv3aJ1siWdGYJDEdTLUMWEn7qvt0k/8AQEnRgB7rUZlOnQwQ0r1wA/GdBQmbYkuLG8Pkz8SiiFL1ePkOi8yKdGJTiMwg3GqU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2018 05:51:53.0602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a9fe473-5030-411d-96f4-08d613bcd8e1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2304 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 Thu Sep 6 05:50:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10589891 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 BD33C6CB for ; Thu, 6 Sep 2018 05:52:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADD952A382 for ; Thu, 6 Sep 2018 05:52:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A16342A55B; Thu, 6 Sep 2018 05:52:01 +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 453752A556 for ; Thu, 6 Sep 2018 05:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbeIFKZp (ORCPT ); Thu, 6 Sep 2018 06:25:45 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:31074 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725851AbeIFKZp (ORCPT ); Thu, 6 Sep 2018 06:25:45 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 06 Sep 2018 14:51:56 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 2F48777F97; Thu, 6 Sep 2018 14:51:56 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,334,1531753200"; d="scan'208";a="291703404" Received: from mail-ty1jpn01lp0176.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.176]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 06 Sep 2018 14:51:55 +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=FDoLi7RHnJPy4NVtR6pBLJSc4kqJnecBp/lar0E8WIQQ4tR4y7RWxFhenj2a74DGs8t9NWYVV3uaDuNw5frH0vDwHpnxNEG7SPdmYZDoMIF8InHGkoA+/EI5dk32VoTBs3HoFbZIWMrHardN1WFFF24S39lM/0d/y2ES9rtJfR0= Received: from localhost.localdomain (211.11.155.144) by TYAPR01MB2304.jpnprd01.prod.outlook.com (2603:1096:404:8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.16; Thu, 6 Sep 2018 05:51:53 +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 v3 2/3] dt-bindings: usb: renesas_usbhs: add clock-names property Date: Thu, 6 Sep 2018 14:50:13 +0900 Message-Id: <1536213014-1325-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1536213014-1325-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1536213014-1325-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSAPR01CA0158.jpnprd01.prod.outlook.com (2603:1096:604:d::26) To TYAPR01MB2304.jpnprd01.prod.outlook.com (2603:1096:404:8::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 817a7761-a750-423b-5761-08d613bcd943 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:TYAPR01MB2304; X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;3:ErT8wy4PZm6hc0AsvVMIncU59VWc45qFKnGABqhjexFTLItBYOl7NlHzJmA2s/nwDqN6CF5XqCjv+95BcG7DcPgskFRRPbN8FTFxewWuwIOeBynYJvdVZMR9zE+SGIQiqWg3/x3GKMxADW8nf98HjEthAELwM/HkPuUsMiZgwSJ0mX22sthPaSdWNDbCyM8M7tgP+/S+1PiTf8GUOu1FKxDrFw8SunDjCU2DFhwCR8Kt07dFHTLrF9sI0VkTG5FQ;25:5riVShPIFOv6rPev7j797tM19uqqeLcRbXoV7rFDrL8zmGNCHvL7x0AykLy5dqriQWcyMVh0Z1fBPtx6lUcKrlYVGFcf8CZqvmowYcp16i3L6LqV3nfBqvX1fuiorflGT+X2a+WU0GbXTj1OAgBa+cEK111J98HGLiytCQxR8VvV1x/WhqIquuc/G1iawZ8OOR/z3fPlCays1b7IY7dC55v7lrCOaQgL2wLXXCDi9PMv1Xw0Q9pcwZrxhHX0I4ro0YpKkpd8yofK1cIHjZ23obf8m9DDCuy5dKUAX8p8RlCPO1aqIUaLqibXKliOm8vPHudIjHeNfVA6r1PC8pLYpw==;31:r+ZNgejxVddZiltUbRvGUXa7Dxf4SwFa5gE4AaVhxzQSXihYXT9tH76WL4ZsYJ5JHAkPgljWax7mzGLoEKN4pH1Jinuunu0/pXmwVNahKPGlZHaMmzgm7NiSxmfp0b3FHdXwDupud4j6v4sxpxR00jYM5axQOCxRkOvPwOre/3djZLJ+fefX+uTgiKsXpNDu70sAFq5F70Cpou1vsaw3j5GLoYMMxFGtT7+gRNMd1PI= X-MS-TrafficTypeDiagnostic: TYAPR01MB2304: X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;20:U314nUJ2e4F/y5RUERUov1wpZUWDSo7yQqPLWCA+hqV0FX/OV/ZJtYHwLyN9qxXVawRZgs443c1FiWsTkUGxq4B8b6OvMwfhAh1Cyf5eL8bkpq9jkPvHfRPn9QjgdQ/NfHHoyVIZRaV9Pt73/zOmDPhhRKpWVzgMX/ZCgJRfAJngZwlA2XczrwFC5u+Z6gWCx64imx4HqFdjpZ94U3r/P/1H2TfQVP7XgPHqoV9YE1CQxeP7xsfrwpPFsJ9LIJJvbPJTUShDZWZO9vm58ckqPZPBsGIbu1UTPkU1aEx0PVa+mLeafWnhCF2sGoYYpwjsJJWnxfTg56rp0oAI/uHe0dEWPRIoIGJIgqhC0wqaV7/SEo4POTMICU5kWqRvBrHkZw0TMbAvBds+Th1EqgTcngLPlgTb05TS6fd71kVpEXwMoQ8fBVGdGF3uxLsQKOJaqtwrp63lQ8/VCTaidYqhAPUPGF5annteRHoguA1MYkptAq6pxaORcqPNB0JJFe62;4:Eb/NvHx+vN9fE9BIEjy4wf4vOGYkw3uKPGYKqkNBOqsabi/9rCpYi4m5VuHD8w/x48rIzz1E3ghgzi5FQU0apVRcKXmi/tzjY6CIs0hKIN38dSntsaVZerfi9ajoUTRrtV7zYL85DON/hJOTnzvSSRxuhU1Q3EPuxs0+T0qXjzw7BcLhFY8ZENPE0CgNni40+5yRo3ZDZ3/ZJVfadcSxOqSOrPlMBuFcE6gn8t8AUKv0zYgL91wo8lOKpUHAkIGYFwDwTW+7U0QmO/rmD/xQIQ== 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)(823301075)(10201501046)(3002001)(3231344)(944501410)(52105095)(93006095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(201708071742011)(7699016);SRVR:TYAPR01MB2304;BCL:0;PCL:0;RULEID:;SRVR:TYAPR01MB2304; X-Forefront-PRVS: 0787459938 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(346002)(136003)(39860400002)(376002)(396003)(189003)(199004)(76176011)(52116002)(2616005)(2906002)(106356001)(16526019)(476003)(105586002)(6506007)(386003)(498600001)(6666003)(6346003)(51416003)(50466002)(5660300001)(3846002)(6116002)(68736007)(26005)(316002)(16586007)(25786009)(78352004)(66066001)(4326008)(107886003)(7736002)(305945005)(81166006)(48376002)(36756003)(42882007)(50226002)(47776003)(8936002)(53936002)(11346002)(8676002)(6486002)(6512007)(446003)(69590400006)(486006)(97736004)(956004)(81156014)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:TYAPR01MB2304;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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;23:YNw2r8DDyARkIVXwX2i0ZjzbGtlTjfvLQAXrDIFp4SUQAUX5EXRr89PYtWBIFYUzi/biwZvToCOZWp40JuOBmeJFlXZ4PMMcQqTaKyQTkFthceA4belSMHUths5HwPHDQuwpCrMrDTOUnBVHlMxYCwhN00cRuwm+orD7wM5/pcdWQ8I0OVTw1+ALijnxJ8RnjkurVL1tbWKza2s9/vL8WZjPUR6yL5cscP65vVch9vam9alL2R/PcoDpSsw4KtHFxSeB4b+bn582rhLttt2d8UQUUVPubGxH1Zp+kiV1JCS3gNHevwDXvm7+z2426koAb6PgAREjGuFHU8e8ecnooHBMonJvdyJ+YSP/ZNNBiQ1CPr6DD1+5F90NehdFuwwIZ6xLqQGCWeOMvsva3ddHEMZ6QCGISRyAD/q0C+T2jM+C1C4drW2dl6gWejIq0pwqUD0VBlFy5R2HrEC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qgjEWors0NpRm SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;20:JqPF+rxLSxYb4prHfAmlNTzmV4g9QeEKN3cRbCviLTVe5VQ9NFPJSR/LVNjms6XfR+AI0HHIMr4bxwJMtyzqVRwj7IITBJX76dkXS51aTX9AvqB+b64ybph6mqowFYS2UKhFYetJuvbHjZc2XmK8ebdQNhpIyqYH0nEV35moKOg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2018 05:51:53.7008 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 817a7761-a750-423b-5761-08d613bcd943 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2304 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 Thu Sep 6 05:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10589899 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 AF0F26CB for ; Thu, 6 Sep 2018 05:52:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A01B12A556 for ; Thu, 6 Sep 2018 05:52:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 945772A55B; Thu, 6 Sep 2018 05:52:04 +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 321982A582 for ; Thu, 6 Sep 2018 05:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726354AbeIFKZs (ORCPT ); Thu, 6 Sep 2018 06:25:48 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:49404 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726031AbeIFKZr (ORCPT ); Thu, 6 Sep 2018 06:25:47 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 06 Sep 2018 14:51:56 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id B12D777F9D; Thu, 6 Sep 2018 14:51:56 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,334,1531753200"; d="scan'208";a="290148651" Received: from mail-ty1jpn01lp0183.outbound.protection.outlook.com (HELO JPN01-TY1-obe.outbound.protection.outlook.com) ([23.103.139.183]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 06 Sep 2018 14:51:56 +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=XRfmzUF+zLjFJKMOaKoCmpNporJRSQ4m+FQWL6bT3pw=; b=h3i5hGHW+syBZsi5hL+XEsAh+62Beo8//0QuFkzGjLjzioSXCLyIumOhmCqfu0NXkM3ez6fR9EwRW/krU0yHFtnOvlEIzW+V5I4kIMk0jakFkQR+dknoph1y5Ezy+RKhIldTtCzNwwmBr+f8jM6ftB96JCiX4ZqjzJ3+JTFSj2A= Received: from localhost.localdomain (211.11.155.144) by TYAPR01MB2304.jpnprd01.prod.outlook.com (2603:1096:404:8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.16; Thu, 6 Sep 2018 05:51:54 +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 v3 3/3] usb: renesas_usbhs: Add multiple clocks management Date: Thu, 6 Sep 2018 14:50:14 +0900 Message-Id: <1536213014-1325-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1536213014-1325-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1536213014-1325-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OSAPR01CA0158.jpnprd01.prod.outlook.com (2603:1096:604:d::26) To TYAPR01MB2304.jpnprd01.prod.outlook.com (2603:1096:404:8::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc0b7298-7bca-4cda-c9b0-08d613bcd996 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:TYAPR01MB2304; X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;3:LsLK71rFvK48lou3qjk2gB8/lzWdvJ4BTw/fbCgVcER7qZ/s/E5NOgTRMc076ow7UL5jv0svE3dctEpSygSDf6golVSkMdRtmClAYKjLGP+DDI8REdzk19foUKlPNNDfx4zOMjvs/SvfO1weaMkBUv9yr6VbFaY/eLQIROKtE7YnPv1Xyb+hVkmIcr0rgVPCQRKuBNUrs6rXIkbOHUIS3hhO0SWoN3HQtDI00dQZw11hQVQ2MiUSSPoJUc5SjtHY;25:t3pZapxnJXeyzK+kvsgNL781ckiG14UTCdriFm6hWSv0/wUZ9K3dxBMdWxaAzSEkvTA7Fr7zmYfXR+vYieGx212/P2nc6YR1tMuTs63Tz7h0+CDvQNQipKv/yaYRF2dxrMoLfpGkVx27mHckHbZ+3qLXcI9JpcoY1ttbFqmAnYeYLXKfWeRrXr5/Gl78C91p8TPr+BRvLBqPO1cUCa+l8G2acnJy3k0s+qndT/Ni8Ok4VUHT5trHmpExuks/yK//xotaKAbuxiPqEUUP/xJbObXMEgk7mYGyrpUCFDpP/bVcd1p52sXH6yo7eqEb0EcKBG6RFeZBqxM5pukkzOVDsQ==;31:YCiPaavC6S3cni8w6wEnRH0lw+RYj6rhS4fBa4bMJxjF65sVh5dsQYFC8RME6/q44PGzI8NwPfnn/3ipsDegzAHaCJcEBJT0Gcvsx6e6JHg+nKYptGDspZtaaS3yb74k6z8BxIc7u943zTLwwnJUXtr/BewI57mcXV7igMDftpc68WW195j63EDh8Cs62NwNHyEcn+JZfq8yS4ubRMthe9sON8Iyu+2sfJUkRHHaglY= X-MS-TrafficTypeDiagnostic: TYAPR01MB2304: X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;20:GqldncdHQqckcSLv8LniT7MrpT54f3pdDPAUebNODVvkAItY9EgEPxfQ012quSmjV3w32F5fBTGWI0BHdGcqWyiI74csCDwFtMP/CrZMBTlu+scDbcpswzuX03jOx9WAK3x4Q5jNlsqWUkWBJxc5xNUi+ggKp3l6B96CYbWweChtYVFxAm1YBB99INaahRmlkMq6xA20QS6ks33KtdK8wr/CmDQpTxKAY8Qy7Sq0yb0B6gAahl08QM1+TymIGeVbRPv6SNwwoXQOn5dX219VUv0ETpBq5kp5185kgB9UdupFinB5D37uYDRCD9eH4edWtHK5pXRenoguxLld3EOHM8Gg3wLG9pGlDpNcIfTWZlFRL1CIUkVJy7/0hpdgmbnwDWiWPf6I8Y8n800PXMz+8YQjprdNLoFdpYQX9+ynrCqbqDKPvRWND1X4Vp3zwmul5D8Y6G+6GxmKklhs3jNVI9EyqxBZzHshKja/7xhYM113dQcyned5UwN9Gz0JERG0;4:raFVCJaYI1GLEv1T2yI3Sw5pLW0HDM11IQN73bKGV4eO06K9MiIryQoG+eH/EWgxXhCPNCdse2y0Jzbvoqdyiy26tqeDW+wSWu+jW8bm8UR/AWUIfBaSILQEHu3Zprw+RCuF98ZCELxFAJoQCM0qg/sCMLzREek8whbA4G6FGkiLFD12lVPfySsx7/cWAMKewQFj5Q9tiddpjBGQTs5OfYGSRo6Z6JkiKp0F8d59M44SR0XVrBcBQen+pcIF0fYFsL58aHGPE5k9PWq/twa7UA== 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)(823301075)(10201501046)(3002001)(3231344)(944501410)(52105095)(93006095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(201708071742011)(7699016);SRVR:TYAPR01MB2304;BCL:0;PCL:0;RULEID:;SRVR:TYAPR01MB2304; X-Forefront-PRVS: 0787459938 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(346002)(136003)(39860400002)(376002)(396003)(189003)(199004)(76176011)(52116002)(2616005)(2906002)(106356001)(16526019)(476003)(105586002)(6506007)(386003)(498600001)(6666003)(6346003)(51416003)(50466002)(5660300001)(3846002)(6116002)(68736007)(26005)(316002)(16586007)(25786009)(78352004)(66066001)(4326008)(107886003)(7736002)(305945005)(81166006)(48376002)(36756003)(42882007)(50226002)(47776003)(8936002)(53936002)(11346002)(8676002)(6486002)(6512007)(446003)(69590400006)(486006)(97736004)(956004)(81156014)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:TYAPR01MB2304;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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=<>; X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;23:h1K7kptQ4gQeW7kwGA1aONDlH42t2bU+QkY+q+JfN4bbTuLAMK/dQUl5HdwpMfs5AhHYyBr70O9IbGIe3frq//zHYtAQ1/ZA02rwlX5mwyguoSkP57H1RQDCgwMlSqELmb/oBej5KzO0N/R0v8fN+yM+ad3+6IerHxd85L43ZDnL7GqwPzIi3K9itDIPyOzqsMVPvkMyCrpFjJn2jSj2n7CD0ZdlAaHqHSK9LRcKZMSPyVXEdxZOXcByblzWtTSy+hztT9rQjeA5T2zMiKQ4ExZ2OWMWa/2BnCuLb9dL/QMh5fEH1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8W6rPW9hH6d227MxFGJVDRPju+A8P2CRQqbtFfGiKFPvtninjMXZNGgHzAl1bYrYzNB6jvg/tU2CDAwqCsNq4ev9kyKW62Jk0VndNQ6RH8+VHpTyHAEWEs2/lJ/PypLSvSOOpE/nmJ9ditEr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;TYAPR01MB2304;20:HUScuOIzAl4AzG5qwIijU/Pou11gGusM0lmyJ0wtSLmtR0SWq/mAIj0WhCDdor9aBLDqgWD+ejA+inB7FY1lzqyEGYtkGhgvgB6J/qY8SHCDoupycl148SNXgKU5LNFUgXlP85fjhk4XqGLvVUSnZ8EHxvJj+Klp9if+jQq3amU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2018 05:51:54.2633 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fc0b7298-7bca-4cda-c9b0-08d613bcd996 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2304 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 | 25 +++++++++++++++++++++++++ drivers/usb/renesas_usbhs/common.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 1d355d5..d1e37cc 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 @@ -341,6 +342,11 @@ static void usbhsc_power_ctrl(struct usbhs_priv *priv, int enable) /* enable PM */ pm_runtime_get_sync(dev); + /* enable clks if exist */ + if (priv->num_clks && + clk_bulk_prepare_enable(priv->num_clks, priv->clks)) + return; + /* enable platform power */ usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); @@ -353,6 +359,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 +630,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 +684,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 +743,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; }; /*