[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cc8b9eea-ea4c-4943-a0f2-c2a791903440@nexus-software.ie>
Date: Wed, 29 Nov 2023 20:53:56 +0000
From: Bryan O'Donoghue <pure.logic@...us-software.ie>
To: Konrad Dybcio <konrad.dybcio@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Andy Gross <agross@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Johan Hovold <johan+linaro@...nel.org>
Subject: Re: [PATCH v2 01/15] clk: qcom: branch: Add a helper for setting the
enable bit
On 29/11/2023 18:59, Konrad Dybcio wrote:
> We hardcode some clocks to be always-on, as they're essential to the
> functioning of the SoC / some peripherals. Add a helper to do so
> to make the writes less magic.
>
> Reviewed-by: Johan Hovold <johan+linaro@...nel.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
> drivers/clk/qcom/clk-branch.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h
> index 0cf800b9d08d..155818cc8d49 100644
> --- a/drivers/clk/qcom/clk-branch.h
> +++ b/drivers/clk/qcom/clk-branch.h
> @@ -47,6 +47,7 @@ struct clk_branch {
> #define CBCR_FORCE_MEM_PERIPH_OFF BIT(12)
> #define CBCR_WAKEUP GENMASK(11, 8)
> #define CBCR_SLEEP GENMASK(7, 4)
> +#define CBCR_CLOCK_ENABLE BIT(0)
>
> static inline void qcom_branch_set_force_mem_core(struct regmap *regmap,
> struct clk_branch clk, bool on)
> @@ -81,6 +82,12 @@ static inline void qcom_branch_set_sleep(struct regmap *regmap, struct clk_branc
> FIELD_PREP(CBCR_SLEEP, val));
> }
>
> +static inline void qcom_branch_set_clk_en(struct regmap *regmap, u32 cbcr)
> +{
> + regmap_update_bits(regmap, cbcr, CBCR_CLOCK_ENABLE,
> + CBCR_CLOCK_ENABLE);
> +}
> +
> extern const struct clk_ops clk_branch_ops;
> extern const struct clk_ops clk_branch2_ops;
> extern const struct clk_ops clk_branch_simple_ops;
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Powered by blists - more mailing lists