From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Taniya Das <quic_tdas@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
Alex Elder <elder@linaro.org>
Subject: [PATCH v3 5/8] clk: qcom: rpmh: support separate symbol name for the RPMH clocks
Date: Fri, 2 Dec 2022 20:58:40 +0200 [thread overview]
Message-ID: <20221202185843.721673-6-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20221202185843.721673-1-dmitry.baryshkov@linaro.org>
Both ARC and VRM clocks have minor differences between platforms.
However using SoC names directly results in duplication, confusion and
ocassional errors. Next patches are going to drop the SoC names and
encode these differences into the clock names.
To keep the system clock names (visible to userspace) intact, add
separate symbol names that are used in the code.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/clk/qcom/clk-rpmh.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index 2ab406c1dab5..34099bb6b899 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -70,15 +70,15 @@ struct clk_rpmh_desc {
static DEFINE_MUTEX(rpmh_clk_lock);
-#define __DEFINE_CLK_RPMH(_platform, _name, _res_name, \
+#define __DEFINE_CLK_RPMH(_platform, _name, _clk_name, _res_name, \
_res_en_offset, _res_on, _div) \
- static struct clk_rpmh _platform##_##_name##_ao; \
- static struct clk_rpmh _platform##_##_name = { \
+ static struct clk_rpmh _platform##_##_clk_name##_ao; \
+ static struct clk_rpmh _platform##_##_clk_name = { \
.res_name = _res_name, \
.res_addr = _res_en_offset, \
.res_on_val = _res_on, \
.div = _div, \
- .peer = &_platform##_##_name##_ao, \
+ .peer = &_platform##_##_clk_name##_ao, \
.valid_state_mask = (BIT(RPMH_WAKE_ONLY_STATE) | \
BIT(RPMH_ACTIVE_ONLY_STATE) | \
BIT(RPMH_SLEEP_STATE)), \
@@ -92,12 +92,12 @@ static DEFINE_MUTEX(rpmh_clk_lock);
.num_parents = 1, \
}, \
}; \
- static struct clk_rpmh _platform##_##_name##_ao= { \
+ static struct clk_rpmh _platform##_##_clk_name##_ao= { \
.res_name = _res_name, \
.res_addr = _res_en_offset, \
.res_on_val = _res_on, \
.div = _div, \
- .peer = &_platform##_##_name, \
+ .peer = &_platform##_##_clk_name, \
.valid_state_mask = (BIT(RPMH_WAKE_ONLY_STATE) | \
BIT(RPMH_ACTIVE_ONLY_STATE)), \
.hw.init = &(struct clk_init_data){ \
@@ -112,11 +112,11 @@ static DEFINE_MUTEX(rpmh_clk_lock);
}
#define DEFINE_CLK_RPMH_ARC(_platform, _name, _res_name, _res_on, _div) \
- __DEFINE_CLK_RPMH(_platform, _name, _res_name, \
+ __DEFINE_CLK_RPMH(_platform, _name, _name, _res_name, \
CLK_RPMH_ARC_EN_OFFSET, _res_on, _div)
#define DEFINE_CLK_RPMH_VRM(_platform, _name, _res_name, _div) \
- __DEFINE_CLK_RPMH(_platform, _name, _res_name, \
+ __DEFINE_CLK_RPMH(_platform, _name, _name, _res_name, \
CLK_RPMH_VRM_EN_OFFSET, 1, _div)
#define DEFINE_CLK_RPMH_BCM(_name, _res_name) \
--
2.35.1
next prev parent reply other threads:[~2022-12-02 18:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 18:58 [PATCH v3 0/8] clk: qcom: rpm/rpmh: drop platform names Dmitry Baryshkov
2022-12-02 18:58 ` [PATCH v3 1/8] clk: qcom: rpmh: group clock definitions together Dmitry Baryshkov
2022-12-02 18:58 ` [PATCH v3 2/8] clk: qcom: rpmh: reuse common duplicate clocks Dmitry Baryshkov
2022-12-02 18:58 ` [PATCH v3 3/8] clk: qcom: rpmh: drop all _ao names Dmitry Baryshkov
2022-12-02 18:58 ` [PATCH v3 4/8] clk: qcom: rpmh: remove platform names from BCM clocks Dmitry Baryshkov
2022-12-02 18:58 ` Dmitry Baryshkov [this message]
2022-12-02 19:29 ` [PATCH v3 5/8] clk: qcom: rpmh: support separate symbol name for the RPMH clocks Alex Elder
2022-12-02 18:58 ` [PATCH v3 6/8] clk: qcom: rpmh: rename ARC clock data Dmitry Baryshkov
2022-12-02 19:29 ` Alex Elder
2022-12-02 18:58 ` [PATCH v3 7/8] clk: qcom: rpmh: rename VRM " Dmitry Baryshkov
2022-12-02 19:29 ` Alex Elder
2022-12-02 18:58 ` [PATCH v3 8/8] clk: qcom: rpmh: remove usage of platform name Dmitry Baryshkov
2022-12-02 19:30 ` Alex Elder
2022-12-02 19:55 ` [PATCH v3 0/8] clk: qcom: rpm/rpmh: drop platform names Bjorn Andersson
2022-12-02 20:58 ` 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=20221202185843.721673-6-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=elder@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_tdas@quicinc.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