From patchwork Fri Jan 20 09:24:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 9527825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B56460459 for ; Fri, 20 Jan 2017 09:24:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BBA5285DF for ; Fri, 20 Jan 2017 09:24:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F25222867E; Fri, 20 Jan 2017 09:24:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,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 6DAD6285DF for ; Fri, 20 Jan 2017 09:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751615AbdATJYy (ORCPT ); Fri, 20 Jan 2017 04:24:54 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:37456 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751543AbdATJYx (ORCPT ); Fri, 20 Jan 2017 04:24:53 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v0K9OoWY025776; Fri, 20 Jan 2017 03:24:50 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v0K9OoF8004766; Fri, 20 Jan 2017 03:24:50 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Fri, 20 Jan 2017 03:24:49 -0600 Received: from [172.24.190.171] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v0K9OjpZ005191; Fri, 20 Jan 2017 03:24:46 -0600 Subject: Re: [PATCH] arm: davinci: Make the usb20 clock available to PM runtime To: Alexandre Bailon , References: <20170119173155.5599-1-abailon@baylibre.com> CC: , , , , , , From: Sekhar Nori Message-ID: Date: Fri, 20 Jan 2017 14:54:44 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170119173155.5599-1-abailon@baylibre.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thursday 19 January 2017 11:01 PM, Alexandre Bailon wrote: > On 01/19/2017 05:49 PM, Grygorii Strashko wrote: >> On 01/19/2017 09:08 AM, Alexandre Bailon wrote: >>> On 01/19/2017 03:48 PM, Sekhar Nori wrote: >>>> On Thursday 19 January 2017 07:39 PM, Alexandre Bailon wrote: >>>>> Add usb20 to the list of clock supported by PM runtime. >>>>> >>>>> Signed-off-by: Alexandre Bailon >>>>> --- >>>>> arch/arm/mach-davinci/pm_domain.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/arch/arm/mach-davinci/pm_domain.c b/arch/arm/mach-davinci/pm_domain.c >>>>> index 78eac2c..66471f2 100644 >>>>> --- a/arch/arm/mach-davinci/pm_domain.c >>>>> +++ b/arch/arm/mach-davinci/pm_domain.c >>>>> @@ -23,7 +23,7 @@ static struct dev_pm_domain davinci_pm_domain = { >>>>> >>>>> static struct pm_clk_notifier_block platform_bus_notifier = { >>>>> .pm_domain = &davinci_pm_domain, >>>>> - .con_ids = { "fck", "master", "slave", NULL }, >>>>> + .con_ids = { "fck", "master", "slave", "usb20", NULL }, >>>> >>>> Instead of doing this, can we drop the con_id from musb clock? Looking >>>> at the USB clocking diagram in the TRM. There is a single clock input to >>>> the USB 2.0 subsystem. There is no real need for a con_id at all. >>> Currently, the con_id is required to get the usb20 clock from usb-da8xx.c >>> I will try to figure out which changes are required remove con_id. >> >> It most probably should be renamed to "fck" then it should work with your >> patch "[PATCH v3 5/5] usb: musb: da8xx: Add a primary support of PM runtime". > Actually, because of the USB phy, more changes are required. > Something like that works for me. There are too many things going on in your patch and I am not clear why all of those changes are needed. The following diff worked for me on top of master branch of my tree. Can you check if this works for you? If not, I need some more explanation of why you are making all the changes that you are. Thanks, Sekhar ---8<--- --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 073c458d0c67..2cfd9d70a818 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -412,7 +412,7 @@ static struct clk_lookup da830_clks[] = { CLK("davinci-mcasp.0", NULL, &mcasp0_clk), CLK("davinci-mcasp.1", NULL, &mcasp1_clk), CLK("davinci-mcasp.2", NULL, &mcasp2_clk), - CLK("musb-da8xx", "usb20", &usb20_clk), + CLK("musb-da8xx", NULL, &usb20_clk), CLK(NULL, "aemif", &aemif_clk), CLK(NULL, "aintc", &aintc_clk), CLK(NULL, "secu_mgr", &secu_mgr_clk), diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 55f6e1172517..946cd06d8c05 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -567,7 +567,7 @@ static struct clk_lookup da850_clks[] = { */ CLK(NULL, "aemif", &aemif_nand_clk), CLK("ohci-da8xx", "usb11", &usb11_clk), - CLK("musb-da8xx", "usb20", &usb20_clk), + CLK("musb-da8xx", NULL, &usb20_clk), CLK("spi_davinci.0", NULL, &spi0_clk), CLK("spi_davinci.1", NULL, &spi1_clk), CLK("vpif", NULL, &vpif_clk), diff --git a/arch/arm/mach-davinci/usb-da8xx.c b/arch/arm/mach-davinci/usb-da8xx.c index 9a6af0bd5dc3..9b667689b665 100644 --- a/arch/arm/mach-davinci/usb-da8xx.c +++ b/arch/arm/mach-davinci/usb-da8xx.c @@ -275,7 +275,7 @@ int __init da8xx_register_usb20_phy_clk(bool use_usb_refclkin) struct clk *parent; int ret; - usb20_clk = clk_get(&da8xx_usb20_dev.dev, "usb20"); + usb20_clk = clk_get(&da8xx_usb20_dev.dev, NULL); ret = PTR_ERR_OR_ZERO(usb20_clk); if (ret) return ret; diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index e89708d839e5..8f6f0efd978e 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c @@ -502,7 +502,7 @@ static int da8xx_probe(struct platform_device *pdev) if (!glue) return -ENOMEM; - clk = devm_clk_get(&pdev->dev, "usb20"); + clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) { dev_err(&pdev->dev, "failed to get clock\n"); return PTR_ERR(clk);