[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161119716362.3661239.18168143877101107424@swboyd.mtv.corp.google.com>
Date: Wed, 20 Jan 2021 18:46:03 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>,
Michael Turquette <mturquette@...libre.com>,
Taniya Das <tdas@...eaurora.org>
Cc: Rajendra Nayak <rnayak@...eaurora.org>,
linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1] clk: qcom: gcc-sc7180: Mark the MM XO clocks to be always ON
Quoting AngeloGioacchino Del Regno (2021-01-20 01:16:17)
> Il 20/01/21 08:47, Taniya Das ha scritto:
> > 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.
> >
>
> Hello Tanya,
>
> > Fixes: 8d4025943e13 ("clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones")
> > Signed-off-by: Taniya Das <tdas@...eaurora.org>
> > ---
> > drivers/clk/qcom/gcc-sc7180.c | 47 ++++---------------------------------------
> > 1 file changed, 4 insertions(+), 43 deletions(-)
> >
> > --
> > Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member
> > of the Code Aurora Forum, hosted by the Linux Foundation.
> >
> > 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 <linux/clk-provider.h>
> > @@ -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,
> > - },
> > - },
> > -};
> > -
>
> Why are you avoiding to register these clocks entirely?
> If this is needed by the Titan GDSC, this clock "does indeed exist".
>
> If these clocks shall never be turned off, then you should add the
> CLK_IS_CRITICAL flag and perhaps add a comment explaining why.
I'd rather not have critical clks wasting kernel memory and registration
time if they're never going to be turned off and we're basically just
writing a bit so that they're always on. This patch looks OK to me from
that perspective. There aren't any parents for these clks either so
really it's a glorified bit toggle and poll to make sure that it is
enabled. Maybe we should be checking that they're actually enabled at
the end of probe, but otherwise we don't need all this complexity.
Powered by blists - more mailing lists