From patchwork Fri Aug 31 06:48:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10583193 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 C5E5D112B for ; Fri, 31 Aug 2018 06:50:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6A032BCE0 for ; Fri, 31 Aug 2018 06:50:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB0C92BCFD; Fri, 31 Aug 2018 06:50:26 +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 4CD222BCE0 for ; Fri, 31 Aug 2018 06:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727398AbeHaK4W (ORCPT ); Fri, 31 Aug 2018 06:56:22 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:33031 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727203AbeHaK4V (ORCPT ); Fri, 31 Aug 2018 06:56:21 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 31 Aug 2018 15:50:18 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id D13D778A12; Fri, 31 Aug 2018 15:50:18 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,309,1531753200"; d="scan'208";a="291156790" Received: from mail-os2jpn01lp0151.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.151]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 31 Aug 2018 15:50:18 +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=athwH49GFLBnuibwuPcoKvjcsFcnfJnlXoJ2nlWMiRAiByL50cpvWriBJAvsg66jXTm4bKdMSwbyMptEvi4RkBYTPZiooFQb4b+pQg1fSpJVlFgy7L1+ZhDlUFbn0IrAuzxrlouvv0VJ/lkZ/AnsTI0MYt3RKtbMs+5Hb78mQ44= 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.1080.15; Fri, 31 Aug 2018 06:50:15 +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 1/3] usb: renesas_usbhs: Add reset_control Date: Fri, 31 Aug 2018 15:48:37 +0900 Message-Id: <1535698119-10132-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535698119-10132-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1535698119-10132-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0142.jpnprd01.prod.outlook.com (2603:1096:402:1::18) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1d19015a-7067-4a15-d45f-08d60f0e01f6 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:OSBPR01MB2293; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;3:oXQWHF6KzFzhhLlUCCKftWTomh9ZBb8dWouDhPGSfZ+WYERD7LtxYgYgQMIiklcsG/07/sTpplMRBo3gJffiTNT7UlEQbvECI9Wr3HIatWP+wsvorO0emJSP5L1wforgLYyriSjMKmSUpcZGjGzO8ND9IMcxU6dMRK77VkfBVHMuWXhT3qbfI6o6vI4Fbp/0tyJbageFv6zmuXbLM9z6RjKmjuSvZk60/kkRpgTmuSNY2ruWrzwu62Yh149TDr4P;25:+AwH3LaZbn2P04dWOvlUXShxklq5hlbNgPOXsN2x1XLeSDKSnQB4VvOEWBUNFaH5oWTOX5hvJnJpjH9dor5P5GWNO2YDdSfQtGTvQS/TFNb5q4/C9l6NPVwbCQdhi+wgivmduHdlfaPFBBxbC5GLKX+mFcKPJ0NfiUBYMNxjP8X+eRHBsfzZOOLu3FiaVLAZ6Y/hGg9g4yWR3X3YauENguSBZ+UHBpokFuvJYRqYfmTVlBlOGO/nSgHOYHir0qxINgMNOD5E5zRNyqHCThRDwNYZcyyv5wPZslft1klEeoRjk2SvxK9Nvh/B2j2VW6gPJV3iOfDOr9mIKNtB9oCTuw==;31:kRE/2EKgopM4lyvRo6C2rxOHOcUkRHcqXuazS2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-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)(93006095)(3231311)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:OSBPR01MB2293;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2293; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39860400002)(366004)(136003)(346002)(376002)(189003)(199004)(53936002)(68736007)(97736004)(2906002)(78352004)(50466002)(6512007)(2616005)(476003)(48376002)(7736002)(446003)(11346002)(956004)(8676002)(3846002)(50226002)(6116002)(305945005)(486006)(47776003)(66066001)(8936002)(81166006)(6486002)(81156014)(42882007)(105586002)(5660300001)(76176011)(25786009)(52116002)(51416003)(36756003)(106356001)(16586007)(316002)(6666003)(107886003)(498600001)(386003)(4326008)(6506007)(26005)(16526019)(69590400005)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2293;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;OSBPR01MB2293;23:FZSTdk/vcyMgHcK1EEpJ1EdQcmZrO4y+QtQB1IiB9rgwmH8L6thjRpyHjcdLw79N1n/374UiCQeVrPA6aW6mHdsaR0YmHWe89W/AD01l+AnSSzNAMBk00diHZdPz3BCMQ1CKweN16qcKLY5f5C7f//7gfEz2VmlwfN6jF+oKaa/760f2WHdnjaEVKmY5JQ6wSoeIoC/bYCE0G4rKerPfniw7EbxorUXeRGshFpDC9bwRMTDiuW/blC3ySCYX1BUfpgwK5JFMB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NW5jfyaPyoVKu2TIaxrVs+oFjlxZ4X9jI6f2YeE1DnHloup0Wp3GjFQGNiltq8br4w3pp5s3WsC5Rwjmhl/mhwj8khKgFrM15ph2QXCEHm37UGmglW1qkwBA9fuYaI90tLhE2ztayLWyzzzaO8485mUcfTRa06wbtzPqN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;20:emdTqXFur2QpQ67Ck4A8m/+dGMI8wRFcJJaRE63qzicOnj2Q5Hb74/Kz6KX3y4r8CY4NSKiITmiqbw1TCBe/FPp/DCZunvHSDnIWa3Vp+Xr1TtEIPjUVrv2SakH8wDFDkr28UTZQaKs7rbcvyOoTTDjRN/7THw6PdmrER/H77yo= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 06:50:15.4814 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d19015a-7067-4a15-d45f-08d60f0e01f6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2293 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 06:48:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10583187 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 272F0175A for ; Fri, 31 Aug 2018 06:50:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17B292BCE0 for ; Fri, 31 Aug 2018 06:50:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B5492BCFF; Fri, 31 Aug 2018 06:50:24 +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 A503C2BCE0 for ; Fri, 31 Aug 2018 06:50:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727270AbeHaK4T (ORCPT ); Fri, 31 Aug 2018 06:56:19 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:33031 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727200AbeHaK4T (ORCPT ); Fri, 31 Aug 2018 06:56:19 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 31 Aug 2018 15:50:18 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 97FAF815D3; Fri, 31 Aug 2018 15:50:18 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,309,1531753200"; d="scan'208";a="289604906" Received: from mail-os2jpn01lp0146.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.146]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 31 Aug 2018 15:50:18 +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=lfCetyzQB7mKIzzM+lG5yoxrl50dmJu+3qQWmMBG23wz0aZxknCYeFXPTNOpvfq5dN+SkrXXHPiBlVV5ecckJB/atg0LXESikxMkwpGkMCZBgaO9bM4c4BG0j2S+56ONT7p7oJ4zRfq58GgMZDlV48GS8Z8XSckyIAlR8/6raHw= 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.1080.15; Fri, 31 Aug 2018 06:50:15 +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/3] dt-bindings: usb: renesas_usbhs: add clock-names property Date: Fri, 31 Aug 2018 15:48:38 +0900 Message-Id: <1535698119-10132-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535698119-10132-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1535698119-10132-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0142.jpnprd01.prod.outlook.com (2603:1096:402:1::18) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c95dd746-92cd-45a1-2336-08d60f0e023e 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:OSBPR01MB2293; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;3:arIqO14WMkKfjm1OceZU1Spm5F/2S8T4YJdzbD/2X/q9w+5fvrkv2MQZUFv8xeaeGEF2Au4fBcgOxRNqLbFcH6l2WZPIeb8sYzgy9wY45DmiqYKg/EWamV6wkiY0GLp5B2Zwo8QjXlquOyf6GzaRz3oYtiGdabXzB/73owYmkvJgCVBpVuD2x76OR3VUO9/sqQZirPOeJNbROwfN20x7CfgP7t1bDvvzto53jfli3sZeDsLDxM3SMiTCp6A0JwM9;25:MiCGiWZDWVW33CmPrI+qza8zg0G4WgdLMGVcfaiIbRWhzlz6SlX9iNQeHDkt+xqKBnuv4A3hBjPXPqrWf1HHfW4gXJyyqcRVm0j2Oc7NoskXqtz71vd4yPv+AwmTMvZA5QqDYR8varJiEwvLYXxDYHwKjF3vzn+iowotQwgB7b2gUxr+LKEu7S2MAGGLEn3cPaOg4h6iJm2koFBe4o1Bbum2AhyLm3RVdi7eQqOawwMtSR8H1/AG9xKrI7PRYPIQwHVdHJotgAg0JYAz2CwZRZ72N75bU0p7ZcEppzTw8YH8cUrzWenKg15Stbwi8Ekft1ItV1gAvNtdCQXLOFR6og==;31:7Q/osRDNAkFJ+BvJjWwadwIlbjZU8SEEC2hqA5lzBfIA1DSr7JDWg3+V5lmgO+UvNWbIMvhkpHkt7KyNZCIAXyosErjjKthDAYs8GHUr7PMubeLVJpHSdpZxY2ZBjd67bX46CONtfZbJL4XhwUaTVE19YNmk75yFU/ULB37N6m7UjkZoK2AhMdhsjj/JaVxQLr5xSgEoxo9/9la014GmS9H24Y6GwiwciZ5l21YIFnw= X-MS-TrafficTypeDiagnostic: OSBPR01MB2293: X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;20:BxtKSQDZqkrg7EwWWTTLwMuTCY2DFfrfdlpjBao5U06Uk+qdHOu2YT1cJrZcqSjpdBMdUGIyZdvtoTeCIxaOH76vJAiI7xHSvwr1bCw0jyWDaSlqg5+AphnukNpTT2iANo4DQdM1Q8D8Cl1rTJb2e5SNcz5AcDePuL2xjaKq2pQYgaDkpNbAUbfTaP0um99OGMp8LPuMH5qNYw7Bh3Klw28hXuArovkDua2gedYWTzNHYUTkOKGxpZzgU5nkxYblUd8++QASLdEiKraZESRaJJWCql0Zb9JZAtzpcdKlNNdXBs6zwd2lrjooX48YtqpuYDoIt89hfx/wXxoRA+owNBzzbd7fcuCI1BY5C09gnU2CdryJnOZ2APAgJRHAkXMvGQCfypX5yO5uSI6k2RUgj08yk7ldxZsTG356Z8Q4/0w4+C7ea9GRH7YkOxZwYU9zdkwI+672482nZzTrJmpwJY0T7kkayHa8+ardwtP3jz9Fy1hee10p9M1ybic+SFAH;4:h2mc3Fnimve6F22CKMCZqkzQd9D4iYYaNMnbmLjumqjjV3wQqDBNLD+KXrF9yO6Ty/Yh+VIW+CaYjXdE/dXfBIH+WqY+c5ZeWSOh2NT0qrR/wgRtnb3krrsjoL03jzkEbQPjz9Q2bm1ogtTlkZrWHeU7pKCXUg/5yNmX/Iwylgw/0W36Ke2QFu/dXpku+fN/H8TfHt2E6KUtO7qEw8qnbEUbV1snXkAlWrgf6uOrTl9g9SHsfNqp10lWKuZmJO5arLVdFH6d2PEink/s68YaMA== 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)(93006095)(3231311)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:OSBPR01MB2293;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2293; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39860400002)(366004)(136003)(346002)(376002)(189003)(199004)(53936002)(68736007)(97736004)(2906002)(78352004)(50466002)(6512007)(2616005)(476003)(48376002)(7736002)(446003)(11346002)(956004)(8676002)(3846002)(50226002)(6116002)(305945005)(486006)(47776003)(66066001)(8936002)(81166006)(6486002)(81156014)(42882007)(105586002)(5660300001)(76176011)(25786009)(52116002)(51416003)(36756003)(106356001)(16586007)(316002)(6666003)(107886003)(498600001)(386003)(4326008)(6506007)(26005)(16526019)(69590400005)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2293;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;OSBPR01MB2293;23:1gZX+ZHQeOJA+o+NHJVux96SCWMk/u5pMsvKxyhLO2gdjHk4amg/nsWrTe6mnNvPXQrV4cB8Akd9fSmVvKwlTGHM6rLlVXBGX+soUORIdWpTXn1CnbjH5AbZixiy4glQtL2iiOO1JMp6+fJLXLwRscNA2CN2Kzqb373xhZz4QFh6jySofhQqMbBBYTS5ZLkmXl7BuUW4Fp6J+Sb+525cutVcddfW9oE4ZNFJpLnxmyGiZ+k7QWd4qFzJcbe0idUb3v0/KWo4+MW2XqHNoscSptnrzsEIgyCfNirixf8F6fJQ5f6f/Sn4IA0Zr290+KCemFF+xn8Q4JqjgEEdx+Tw1ZhmmhjbQ82FU+EJakEDGWZ4RIdH6cmT2GRDRurqf5uBL3c7UoLgnVu6wCb3aPPcUfEXh7g4iTVwvPWmYUSpS7M4FA2S3PBAjC5vygjZCeLL74JmYQnBgf6XS1/kJGIaVJgLPKLflypNfXIaI7TXJRfh6cB72eJty/OXQHfT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293;20:KQ3I+4yaCTqEJtKkuNbUz+8bl5vy1kZdNyuo5f2rNAgUJeTti9Wtbd6e6tNCRQLymGEpl2e302dl+R/WCXH1LaBuCOfwYEiw8a+WkLCOWcTdRJjT19+7zmCU4p8fWC2mXXcJ1ZWD0MhEXeZN8NpLjvqSYjAd8gpj7nzeoq/B03s= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 06:50:15.9518 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c95dd746-92cd-45a1-2336-08d60f0e023e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2293 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 06:48:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10583195 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 1FDCC175A for ; Fri, 31 Aug 2018 06:50:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DEA82BCE0 for ; Fri, 31 Aug 2018 06:50:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 023302BCFD; Fri, 31 Aug 2018 06:50:27 +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 DEC0F2BCE0 for ; Fri, 31 Aug 2018 06:50:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727397AbeHaK4W (ORCPT ); Fri, 31 Aug 2018 06:56:22 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:53740 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727200AbeHaK4V (ORCPT ); Fri, 31 Aug 2018 06:56:21 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 31 Aug 2018 15:50:19 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 06F1278A14; Fri, 31 Aug 2018 15:50:19 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.53,309,1531753200"; d="scan'208";a="291156791" Received: from mail-os2jpn01lp0151.outbound.protection.outlook.com (HELO JPN01-OS2-obe.outbound.protection.outlook.com) ([23.103.139.151]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 31 Aug 2018 15:50:18 +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=0T5fKQ+JcTdMG+TdOCtlVsyavQaeEVoGteuRgxkSdWg=; b=pm3IFgCpqr1/lSKxhl8wc2RlqfXAEOeDZ/MFhNHXD0LWxveuH4chjjDqTisD4BVSUi5NQ/ujHeq57udBIXJ+W6ZudOPRQF/CNkOUPsjMlB7Qjc4KYj7Vbo34pzcXZrhbpd3MGT1dQgNchYnHl+iiZp5HyrGirYZy0tUwMLnU6T8= 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.1080.15; Fri, 31 Aug 2018 06:50:16 +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 3/3] usb: renesas_usbhs: Add multiple clocks management Date: Fri, 31 Aug 2018 15:48:39 +0900 Message-Id: <1535698119-10132-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535698119-10132-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1535698119-10132-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0142.jpnprd01.prod.outlook.com (2603:1096:402:1::18) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98a3e3b9-60de-4dc6-f8e0-08d60f0e0286 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:OSBPR01MB2293; X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;3:DY+hnqLLifORY0tGryPjdGLEwfVNZxKYXfJTSvXsKgtIo3yo0lzdYvLKOil5Jn6IszL0JgcL4yFTNpc0unP43lmybrABYPFtgIak5+4T87FaUpXlVDzrQg59KV5wF2TqaUx4DQu0VcVSKc9AyxfJNRcFw6YDp+wRqksVJJ0tW1hBlSVJGqZlBY8d4L/99L8+Xs6vhD+nv1x5zekixlj2Cd259Af7OsO/R9bhjl8EmVG++wdpzUZonNjX3hfUMHmG;25:ZJL7/NP2WydGgk2jWwUZY/PBJGJBy2MYDm9PgoKQB+cJzbBJfK1tskpUS3k4OtBs+UXAmOJ18vC9RkwJmIqMMILbpyX5JCsx4OUUNIVb2pqECsSQ4M0NOXyWX3v4OMJmXAykxlTj358VXF1XQrLzq28nSwJqvi0+UHUs/DXDEarM3HzhohEZBY6UZEn9IEyIPrgEU7juSUxcLHalcEDZ8KU7Yw1xswbPZqPv2NUno82hZ8ZDCa1zJ5CxhUMH39xmtiuJiS9w8N3FJwcmURhRwQCSGPTwLgUhNtgKuipBkD0KFstqEwENhWtOmYceDtsr9Z2iqFvzx9utObH+jMgMIw==;31:OGZVIuP4j+FRwPzEuOpw4SBpuucVDvAufY5RnFwuNHYRbL+DlOFYdGkclu8oRefk01nJ662jq15vHDT02hNDJp3X08coaN3kSjKMDGVP34x/dc8VEoNqKA2Mf3x31H583NMwNX07ExcoioW/hxScxLlA7uzUUfxTqQnBIo5ofcCSiasUgHsgPfEh9tlQl2x546kxw2SDZ080QCKkvy0JKqbCrSIuwm1GWAUvVTCJxmU= X-MS-TrafficTypeDiagnostic: OSBPR01MB2293: X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;20:j6bpsl1JwPbIJDOwGenFqGDcrGvbcNlcH0amtHiLsujkUvksW5iZsJs/vONaf34w/wcwxad3QX2amG8XapD/iTEH1IyOIUgoUHo0dO/JvxS70PIdAiI7jIUyEhq1FtVRdPOZtMlAGh0FdBsqYM0eNa88setShufrYxgehiLNRHtZF5Cyr3wda80w0U9QmWo2jewIFe7PmLj31T5Yux1sNEpLORiWbxGONnybBKwpO65ySA1JkfBrreiSOQdgwEvTX52p+N4lw69IUsuhBbdZu/d1WhQi/tgNchEMo8CSIALI4nEOujzikHeQ8XJrh/Bn07oo9jlwudIKbIlwVqKTvdOMVni1YQTijPaHMbuocEAatsbtJ/6skLXRgilFbFh2B/kGNxKvA1ozRuxd+WIRCOk9NSO6zo5H/M0g2t4/SoES2ui5eMxDkKnK0vUGawUrt4q6tXbelyPGkEN37K84SEbg0pzSormpEi2lGGxt3dT9U0nibDP0EZGfXLNBIzTV;4:Wg0ZD+z4NjoT34A9ygKMm9DRBFDBKhjMS19n5Bl/y/u0RbNVc+zpl1QVfFA3KWBBOF2e3YF19/+gOIUQ1YEZchf3Q4WTjNi2Wc6/FBz1z6gj4PleTMrK+tayl3zOJkvaD1QmG5r0Y0LwVP4C7c85xGFdw/u/otPANJ5XZOaunic14dfoYZKRVDKMfk2hvjYkJo5gYiJt3X8N3FvYjiZRBmMbSDC8dbMrqT3+TklVF/8s5w0lInRqUOzZCK+mGdb0o17XZw3hqhVyA63at2Gkyw== 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)(93006095)(3231311)(944501410)(52105095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061750153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:OSBPR01MB2293;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB2293; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(396003)(39860400002)(366004)(136003)(346002)(376002)(189003)(199004)(53936002)(68736007)(97736004)(2906002)(78352004)(50466002)(6512007)(2616005)(476003)(48376002)(7736002)(446003)(11346002)(956004)(8676002)(3846002)(50226002)(6116002)(305945005)(486006)(47776003)(66066001)(8936002)(81166006)(6486002)(81156014)(42882007)(105586002)(5660300001)(76176011)(25786009)(52116002)(51416003)(36756003)(106356001)(16586007)(316002)(6666003)(107886003)(498600001)(386003)(4326008)(6506007)(26005)(16526019)(69590400005)(3720700003);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB2293;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;OSBPR01MB2293;23:nIvHX3ThqnJkn+1oMWJzZb3XhRUnDeyc4y2v4EJpYmT0dfQmTlyUaLZS5qMo5b40g6dHqGszz2EzJcu09le2U9OCJAzv6UmBK3j3vvwgG7gxXeCQzB7W3LB/v7mgKkorkzRIC5LiJOS8H+paGcXLnWgRDVnNJFPjXPOYSD9JFk3YiSiwYyNIkFR2hg5Svg5pLdmcR8CowkB3Q8loiaVr8beXNoISaq5B2JVLepWQccaXbcwiyLcZJVvBO0SfkYw0nd3+jjpur0TCwYbjYOUAjqiXVn2OQoHIH58qaXmGCWKw14PRYu4wI1iO7N6f+Ab7eKdcdBMyuNkTMHDfNtChA7R2tHka4INPkmfD7x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asqXI/QlZzSFOcmvFSBiKEXc5Svnc7kX2pzYfKgrDveJObeLyAGmxdPI9lOMlXL2OMpRIc407Y9rpIKrv0J/do3JX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;OSBPR01MB2293;20:2jlweBMcyzruQZ26hh9gmPHTL9wt83fF8sdj6ykxobAlIONKyJV7o7yNhVk84ZghKUqBppIOcSnd9uRpyzfT0+4xEiMakXAVt/4xNDUx+YXVxAe82ATaMRGAOe4vCEZUaF4zpG/Yyc0slD0ZDDQdQcVsC+6eNf8YroJyjJVzuzc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 06:50:16.4291 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98a3e3b9-60de-4dc6-f8e0-08d60f0e0286 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB2293 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 | 41 ++++++++++++++++++++++++++++++++++++++ drivers/usb/renesas_usbhs/common.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 1d355d5..00d32d1 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,23 @@ 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->clks) { + ret = clk_bulk_prepare(priv->num_clks, priv->clks); + if (!ret) { + ret = clk_bulk_enable(priv->num_clks, + priv->clks); + if (ret) + return; + } + } + /* enable platform power */ usbhs_platform_call(priv, power_ctrl, pdev, priv->base, enable); @@ -353,6 +366,12 @@ 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->clks) { + clk_bulk_disable(priv->num_clks, priv->clks); + clk_bulk_unprepare(priv->num_clks, priv->clks); + } + /* disable PM */ pm_runtime_put_sync(dev); } @@ -534,6 +553,11 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev) return info; } +static const struct clk_bulk_data usbhs_rcar3_clks[] = { + { .id = "hsusb" }, + { .id = "ehci/ohci" }, +}; + static int usbhs_probe(struct platform_device *pdev) { struct renesas_usbhs_platform_info *info = renesas_usbhs_get_info(pdev); @@ -620,6 +644,15 @@ 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 = devm_kmemdup(&pdev->dev, usbhs_rcar3_clks, + sizeof(usbhs_rcar3_clks), GFP_KERNEL); + if (!priv->clks) + return -ENOMEM; + priv->num_clks = ARRAY_SIZE(usbhs_rcar3_clks); + } + /* set driver callback functions for platform */ dfunc = &info->driver_callback; dfunc->notify_hotplug = usbhsc_drvcllbck_notify_hotplug; @@ -667,6 +700,12 @@ static int usbhs_probe(struct platform_device *pdev) if (ret) goto probe_fail_rst; + if (priv->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 +759,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..9105ee0 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; + int num_clks; }; /*