From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: michael.srba@seznam.cz
Cc: Andy Gross <agross@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Linus Walleij <linus.walleij@linaro.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Saravana Kannan <saravanak@google.com>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/5] clk: qcom: gcc-msm8998: add SSC-related clocks
Date: Tue, 25 Jan 2022 21:36:40 -0600 [thread overview]
Message-ID: <YfDByGjf90xDUuly@builder.lan> (raw)
In-Reply-To: <20220124121853.23600-2-michael.srba@seznam.cz>
On Mon 24 Jan 06:18 CST 2022, michael.srba@seznam.cz wrote:
> From: Michael Srba <Michael.Srba@seznam.cz>
>
> This patch adds four clocks which need to be manipulated in order to
Please skip the space on the start of each line here.
> initialize the AHB bus which exposes the SCC block in the global address
> space.
>
> Care should be taken not to write to these registers unless the device is
> known to be configured such that writing to these registers from Linux
> is permitted.
Does this imply that applying this will break the existing devices and
care _must_ be taken, presumably before we can apply the patch?
Regards,
Bjorn
>
> Signed-off-by: Michael Srba <Michael.Srba@seznam.cz>
> ---
> CHANGES:
> - v2: none
> - v3: none
> ---
> drivers/clk/qcom/gcc-msm8998.c | 56 ++++++++++++++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
>
> diff --git a/drivers/clk/qcom/gcc-msm8998.c b/drivers/clk/qcom/gcc-msm8998.c
> index 407e2c5caea4..2d14c3d672fc 100644
> --- a/drivers/clk/qcom/gcc-msm8998.c
> +++ b/drivers/clk/qcom/gcc-msm8998.c
> @@ -2833,6 +2833,58 @@ static struct clk_branch gcc_rx1_usb2_clkref_clk = {
> },
> };
>
> +static struct clk_branch gcc_im_sleep_clk = {
> + .halt_reg = 0x4300C,
> + .halt_check = BRANCH_HALT,
> + .clkr = {
> + .enable_reg = 0x4300C,
> + .enable_mask = BIT(0),
> + .hw.init = &(struct clk_init_data){
> + .name = "gcc_im_sleep_clk",
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> +static struct clk_branch aggre2_snoc_north_axi_clk = {
> + .halt_reg = 0x83010,
> + .halt_check = BRANCH_HALT,
> + .clkr = {
> + .enable_reg = 0x83010,
> + .enable_mask = BIT(0),
> + .hw.init = &(struct clk_init_data){
> + .name = "aggre2_snoc_north_axi_clk",
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> +static struct clk_branch ssc_xo_clk = {
> + .halt_reg = 0x63018,
> + .halt_check = BRANCH_HALT,
> + .clkr = {
> + .enable_reg = 0x63018,
> + .enable_mask = BIT(0),
> + .hw.init = &(struct clk_init_data){
> + .name = "ssc_xo_clk",
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> +static struct clk_branch ssc_cnoc_ahbs_clk = {
> + .halt_reg = 0x6300C,
> + .halt_check = BRANCH_HALT,
> + .clkr = {
> + .enable_reg = 0x6300C,
> + .enable_mask = BIT(0),
> + .hw.init = &(struct clk_init_data){
> + .name = "ssc_cnoc_ahbs_clk",
> + .ops = &clk_branch2_ops,
> + },
> + },
> +};
> +
> static struct gdsc pcie_0_gdsc = {
> .gdscr = 0x6b004,
> .gds_hw_ctrl = 0x0,
> @@ -3036,6 +3088,10 @@ static struct clk_regmap *gcc_msm8998_clocks[] = {
> [GCC_MSS_MNOC_BIMC_AXI_CLK] = &gcc_mss_mnoc_bimc_axi_clk.clkr,
> [GCC_MMSS_GPLL0_CLK] = &gcc_mmss_gpll0_clk.clkr,
> [HMSS_GPLL0_CLK_SRC] = &hmss_gpll0_clk_src.clkr,
> + [GCC_IM_SLEEP] = &gcc_im_sleep_clk.clkr,
> + [AGGRE2_SNOC_NORTH_AXI] = &aggre2_snoc_north_axi_clk.clkr,
> + [SSC_XO] = &ssc_xo_clk.clkr,
> + [SSC_CNOC_AHBS_CLK] = &ssc_cnoc_ahbs_clk.clkr,
> };
>
> static struct gdsc *gcc_msm8998_gdscs[] = {
> --
> 2.34.1
>
next prev parent reply other threads:[~2022-01-26 3:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 12:18 [PATCH v3 1/5] dt-bindings: clock: gcc-msm8998: Add definitions of SSC-related clocks michael.srba
2022-01-24 12:18 ` [PATCH v3 2/5] clk: qcom: gcc-msm8998: add " michael.srba
2022-01-26 3:36 ` Bjorn Andersson [this message]
2022-01-24 12:18 ` [PATCH v3 3/5] dt-bindings: bus: add device tree bindings for qcom,ssc-block-bus michael.srba
2022-01-24 16:01 ` Rob Herring
2022-01-24 23:43 ` Rob Herring
2022-01-24 12:18 ` [PATCH v3 4/5] drivers: bus: add driver for initializing the SSC bus on (some) qcom SoCs michael.srba
2022-01-24 21:16 ` Saravana Kannan
2022-01-24 12:18 ` [PATCH v3 5/5] arm64: dts: qcom: msm8998: reserve potentially inaccessible clocks With the gcc driver now being more complete and describing clocks which might not always be write-accessible to the OS, conservatively specify all such clocks as protected in the SoC dts. The board dts - or even user-supplied dts - can override this property to reflect the actual configuration michael.srba
2022-01-26 3:48 ` Bjorn Andersson
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=YfDByGjf90xDUuly@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=michael.srba@seznam.cz \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=saravanak@google.com \
--cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).