public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Imran Shaik <quic_imrashai@quicinc.com>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: Taniya Das <quic_tdas@quicinc.com>,
	Imran Shaik <quic_imrashai@quicinc.com>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ajit Pandey <quic_ajipan@quicinc.com>,
	Jagadeesh Kona <quic_jkona@quicinc.com>
Subject: Re: [PATCH 2/4] clk: qcom: branch: Add mem ops support for branch2 clocks
Date: Tue, 22 Aug 2023 11:52:59 -0700	[thread overview]
Message-ID: <cb32b5abb9fbe13fb82d906b37908276.sboyd@kernel.org> (raw)
In-Reply-To: <20230808051407.647395-3-quic_imrashai@quicinc.com>

Quoting Imran Shaik (2023-08-07 22:14:05)
> diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h
> index 0cf800b9d08d..0ffda6bef00e 100644
> --- a/drivers/clk/qcom/clk-branch.h
> +++ b/drivers/clk/qcom/clk-branch.h
> @@ -24,8 +24,11 @@
>  struct clk_branch {
>         u32     hwcg_reg;
>         u32     halt_reg;
> +       u32     mem_enable_reg;
> +       u32     mem_ack_reg;
>         u8      hwcg_bit;
>         u8      halt_bit;
> +       u8      mem_enable_ack_bit;
>         u8      halt_check;
>  #define BRANCH_VOTED                   BIT(7) /* Delay on disable */
>  #define BRANCH_HALT                    0 /* pol: 1 = halt */

I suspect making a wrapper around struct clk_branch would be a better
approach so that we don't bloat all the other clk_branch structures that
exist in the qcom clk drivers.

 $ git grep 'struct clk_branch' -- drivers/clk/qcom | wc -l
   6357

How many of these are going to be using these new registers? It may also
make sense to do that for hardware clock gating as well, but I'm not
really sure. Anyway, the idea is

	struct clk_mem_branch {
		u32 enable_reg;
		u32 ack_reg;
		u8  ack_bit;
		struct clk_branch branch;
	};

and then a container_of define. Plus, you can put some comment above the
structure to describe when these clks are used.

  parent reply	other threads:[~2023-08-22 18:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  5:14 [PATCH 0/4] Add support for Qualcomm ECPRI clock controller Imran Shaik
2023-08-08  5:14 ` [PATCH 1/4] dt-bindings: clock: qcom: Add ECPRICC clocks for QDU1000 and QRU1000 Imran Shaik
2023-08-16  5:49   ` Krzysztof Kozlowski
2023-08-22 11:46     ` Imran Shaik
2023-08-08  5:14 ` [PATCH 2/4] clk: qcom: branch: Add mem ops support for branch2 clocks Imran Shaik
2023-08-09 19:57   ` Konrad Dybcio
2023-09-06  6:07     ` Imran Shaik
2023-08-09 19:59   ` Konrad Dybcio
2023-09-06  6:06     ` Imran Shaik
2023-08-22 18:52   ` Stephen Boyd [this message]
2023-09-06  6:06     ` Imran Shaik
2023-08-08  5:14 ` [PATCH 3/4] clk: qcom: Add ECPRICC driver support for QDU1000 and QRU1000 Imran Shaik
2023-08-09 20:01   ` Konrad Dybcio
2023-08-22 11:46     ` Imran Shaik
2023-08-08  5:14 ` [PATCH 4/4] arm64: dts: qcom: qdu1000: Add ECPRI clock controller Imran Shaik
2023-08-09 20:00   ` Konrad Dybcio
2023-08-22 11:46     ` Imran Shaik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb32b5abb9fbe13fb82d906b37908276.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_ajipan@quicinc.com \
    --cc=quic_imrashai@quicinc.com \
    --cc=quic_jkona@quicinc.com \
    --cc=quic_tdas@quicinc.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox