Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp688400pxb; Wed, 20 Jan 2021 18:38:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpztH+7aq6jbvsU9McxppxA4a7Lv6AIH9CPQNhGmu+QYeyqDx9sJ6+efCK6RGck9oAw7fk X-Received: by 2002:a50:fd84:: with SMTP id o4mr7157209edt.340.1611196562768; Wed, 20 Jan 2021 18:36:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611196562; cv=none; d=google.com; s=arc-20160816; b=MuXsoWJmBvzBUDrq/Wa2xymQPRyFSykCNF5RRBb3K/y1K+eMHvueo1mWkvjh3Y8xRo xeKCaO2q6/xbsvSet9sk/Bmgva4BaWRpLSFTuRbS5KYkiSFT9HMEtnx3jsQEEdEpdGxh 9VLAeQbZZN47536AnfRT1JkX9sndcf6BhLm2Xpw8t4bkBt/+fhCVLcLWCDBTVmlgwOmv rsuraDG1QVdRYLnzBzfWTrhUoUD90RXI18zFL1yceCfB1GeuPT4G/dsngA7O4v22PY9F a0hp7IY8Ia09FoFWCzq7/prJb/YMGQwB/AaV+EBsZi5hUgOy9r9P3aMHOf5kU9lqcgPy J1iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N0ikIRODAHgwzg5TM1HT6ZnRLm2FIQf9CYmGIK25T6w=; b=ZOCwETQ1nQ+Jnm82ETvMl8IyQBk2qIVu/imQio340tYyE6izmG8RGEIWcRVBq17ZLI DXh53rpWjU4p0Fr1C7Qr8b/SL50eRoiPo6YUDcLj2I4kQBm9tEfeVNapQ8wsdXZ36WOX 1JVVJV84H/C6olHzZTBn4gF2aUxEpyl/wIyItFdqDYNTftWTY2lovN7/iU1rBSeWKWk0 Ww+X6tI1O92Qgta7RsvgWdWX5VezRZakKqtwPlkSgp5afFhAkt/hRYj11GCR9TPUwY2X TkesaqFpIG7Z/ypnCQIi3HjKpX9ulE1QYujTDmHFw13RP8xQCSofs4ojo6voWxFGh1X2 9QvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KQ1jsn/I"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si1293815ejy.232.2021.01.20.18.35.38; Wed, 20 Jan 2021 18:36:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KQ1jsn/I"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390827AbhAUATx (ORCPT + 99 others); Wed, 20 Jan 2021 19:19:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403814AbhATXTN (ORCPT ); Wed, 20 Jan 2021 18:19:13 -0500 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA0ACC0617A6 for ; Wed, 20 Jan 2021 14:40:43 -0800 (PST) Received: by mail-ot1-x334.google.com with SMTP id 36so13471506otp.2 for ; Wed, 20 Jan 2021 14:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=N0ikIRODAHgwzg5TM1HT6ZnRLm2FIQf9CYmGIK25T6w=; b=KQ1jsn/I1essLHW70M6MBpsmFwLFQqgLosGVhpaT0uLA7nnt4bFyYsMBk1OD4xgO5b SRRqFj69QI/ZFyhj67466muPotunnkZyun6hz6ZKTGDcmgq6VvpVY2men6KmNHAohxYI N+BYsRt5LoEdcfOjz6uEqyRaX+QSwdpMbqXCxuzahixkY1w7J/3R+d9Qt2s53G7Wxsmx w920G2Krt8tW3DyiJynyoiVVLdoilo/d1AqDM4qmm2iwel3M7tLYpV0ajN+dlgBK/LCL VHRtDpCof7DIPofChpCJ76N2z9Gq3JxzXixLND72mulltdMeLgWqsiFKdPVeUWom0c59 FJVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=N0ikIRODAHgwzg5TM1HT6ZnRLm2FIQf9CYmGIK25T6w=; b=eXKCa5T4kwuJ67RrkHfdfUe+URlu8TW74BQfrULgbx7QnPaR9TN5QwhHlH6ZC4lPcv +j9vsIgjr0NvlqhqYBcRh2Q0gUsBRr/A5j3wQlwEIFH4/Ulq9PTcyq8J6BzzIQpvO4F7 0/k5SRZB+rwU+eGpgyjYvBU4jhpbimyK0Hb3sSwmWmu5MaN4ppBWMJXtoYjD+mJfc953 dPMhQC6C4gjskU+de3+6n8G3eksRRTDrFvHzIMiz2uLkPJ1jPu0lmXTRc+8fI00820RK lNjewbYzcqg+om/J9Hol+zpSIG5j+j5ZnThG4p/AQdyIch86UayK8YdxfldYtBwf4N8b NpNA== X-Gm-Message-State: AOAM531abpAfrXZXuhh+JJHgsaitzsl7MNXicbWUe2+TrtRDUl7Cm32v 0jEg+yXblSM3zfv3Dsh96o9kRg== X-Received: by 2002:a9d:7304:: with SMTP id e4mr8490305otk.228.1611182443270; Wed, 20 Jan 2021 14:40:43 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id n11sm681000oij.37.2021.01.20.14.40.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 14:40:42 -0800 (PST) Date: Wed, 20 Jan 2021 16:40:40 -0600 From: Bjorn Andersson To: Taniya Das Cc: Stephen Boyd , Michael Turquette ? , Rajendra Nayak , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1] clk: qcom: gcc-sc7180: Mark the MM XO clocks to be always ON Message-ID: References: <1611128871-5898-1-git-send-email-tdas@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1611128871-5898-1-git-send-email-tdas@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 20 Jan 01:47 CST 2021, Taniya Das wrote: > There are intermittent GDSC power-up failures observed for titan top > gdsc, which requires the XO clock. Thus mark all the MM XO clocks always > enabled from probe. > But if this is the reason for keeping all these {ahb,xo}_clks critical (or upstream just a bunch of hard coded regmap_update_bits()) why don't we properly describe them as dependencies for the clock controller/gdsc? I.e. by the use of pm_clk_add()? Regards, Bjorn > Fixes: 8d4025943e13 ("clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones") > Signed-off-by: Taniya Das > --- > drivers/clk/qcom/gcc-sc7180.c | 47 ++++--------------------------------------- > 1 file changed, 4 insertions(+), 43 deletions(-) > > diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c > index b05901b..88e896a 100644 > --- a/drivers/clk/qcom/gcc-sc7180.c > +++ b/drivers/clk/qcom/gcc-sc7180.c > @@ -1,6 +1,6 @@ > // SPDX-License-Identifier: GPL-2.0-only > /* > - * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. > + * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. > */ > > #include > @@ -919,19 +919,6 @@ static struct clk_branch gcc_camera_throttle_hf_axi_clk = { > }, > }; > > -static struct clk_branch gcc_camera_xo_clk = { > - .halt_reg = 0xb02c, > - .halt_check = BRANCH_HALT, > - .clkr = { > - .enable_reg = 0xb02c, > - .enable_mask = BIT(0), > - .hw.init = &(struct clk_init_data){ > - .name = "gcc_camera_xo_clk", > - .ops = &clk_branch2_ops, > - }, > - }, > -}; > - > static struct clk_branch gcc_ce1_ahb_clk = { > .halt_reg = 0x4100c, > .halt_check = BRANCH_HALT_VOTED, > @@ -1096,19 +1083,6 @@ static struct clk_branch gcc_disp_throttle_hf_axi_clk = { > }, > }; > > -static struct clk_branch gcc_disp_xo_clk = { > - .halt_reg = 0xb030, > - .halt_check = BRANCH_HALT, > - .clkr = { > - .enable_reg = 0xb030, > - .enable_mask = BIT(0), > - .hw.init = &(struct clk_init_data){ > - .name = "gcc_disp_xo_clk", > - .ops = &clk_branch2_ops, > - }, > - }, > -}; > - > static struct clk_branch gcc_gp1_clk = { > .halt_reg = 0x64000, > .halt_check = BRANCH_HALT, > @@ -2159,19 +2133,6 @@ static struct clk_branch gcc_video_throttle_axi_clk = { > }, > }; > > -static struct clk_branch gcc_video_xo_clk = { > - .halt_reg = 0xb028, > - .halt_check = BRANCH_HALT, > - .clkr = { > - .enable_reg = 0xb028, > - .enable_mask = BIT(0), > - .hw.init = &(struct clk_init_data){ > - .name = "gcc_video_xo_clk", > - .ops = &clk_branch2_ops, > - }, > - }, > -}; > - > static struct clk_branch gcc_mss_cfg_ahb_clk = { > .halt_reg = 0x8a000, > .halt_check = BRANCH_HALT, > @@ -2304,7 +2265,6 @@ static struct clk_regmap *gcc_sc7180_clocks[] = { > [GCC_BOOT_ROM_AHB_CLK] = &gcc_boot_rom_ahb_clk.clkr, > [GCC_CAMERA_HF_AXI_CLK] = &gcc_camera_hf_axi_clk.clkr, > [GCC_CAMERA_THROTTLE_HF_AXI_CLK] = &gcc_camera_throttle_hf_axi_clk.clkr, > - [GCC_CAMERA_XO_CLK] = &gcc_camera_xo_clk.clkr, > [GCC_CE1_AHB_CLK] = &gcc_ce1_ahb_clk.clkr, > [GCC_CE1_AXI_CLK] = &gcc_ce1_axi_clk.clkr, > [GCC_CE1_CLK] = &gcc_ce1_clk.clkr, > @@ -2317,7 +2277,6 @@ static struct clk_regmap *gcc_sc7180_clocks[] = { > [GCC_DISP_GPLL0_DIV_CLK_SRC] = &gcc_disp_gpll0_div_clk_src.clkr, > [GCC_DISP_HF_AXI_CLK] = &gcc_disp_hf_axi_clk.clkr, > [GCC_DISP_THROTTLE_HF_AXI_CLK] = &gcc_disp_throttle_hf_axi_clk.clkr, > - [GCC_DISP_XO_CLK] = &gcc_disp_xo_clk.clkr, > [GCC_GP1_CLK] = &gcc_gp1_clk.clkr, > [GCC_GP1_CLK_SRC] = &gcc_gp1_clk_src.clkr, > [GCC_GP2_CLK] = &gcc_gp2_clk.clkr, > @@ -2413,7 +2372,6 @@ static struct clk_regmap *gcc_sc7180_clocks[] = { > [GCC_VIDEO_AXI_CLK] = &gcc_video_axi_clk.clkr, > [GCC_VIDEO_GPLL0_DIV_CLK_SRC] = &gcc_video_gpll0_div_clk_src.clkr, > [GCC_VIDEO_THROTTLE_AXI_CLK] = &gcc_video_throttle_axi_clk.clkr, > - [GCC_VIDEO_XO_CLK] = &gcc_video_xo_clk.clkr, > [GPLL0] = &gpll0.clkr, > [GPLL0_OUT_EVEN] = &gpll0_out_even.clkr, > [GPLL6] = &gpll6.clkr, > @@ -2510,6 +2468,9 @@ static int gcc_sc7180_probe(struct platform_device *pdev) > regmap_update_bits(regmap, 0x0b004, BIT(0), BIT(0)); > regmap_update_bits(regmap, 0x0b008, BIT(0), BIT(0)); > regmap_update_bits(regmap, 0x0b00c, BIT(0), BIT(0)); > + regmap_update_bits(regmap, 0x0b02c, BIT(0), BIT(0)); > + regmap_update_bits(regmap, 0x0b028, BIT(0), BIT(0)); > + regmap_update_bits(regmap, 0x0b030, BIT(0), BIT(0)); > regmap_update_bits(regmap, 0x71004, BIT(0), BIT(0)); > > ret = qcom_cc_register_rcg_dfs(regmap, gcc_dfs_clocks, > -- > Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member > of the Code Aurora Forum, hosted by the Linux Foundation. >