Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: smd-rpm: Move some RPM resources to the common header

In preparation for handling the bus clocks in the icc driver, carve out
some defines and a struct definition to the common rpm header.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Georgi Djakov <djakov@kernel.org>
Link: https://lore.kernel.org/r/20230526-topic-smd_icc-v7-4-09c78c175546@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Konrad Dybcio and committed by
Bjorn Andersson
e1e12674 82a793e2

+15 -13
-13
drivers/clk/qcom/clk-smd-rpm.c
··· 18 18 19 19 #include <dt-bindings/clock/qcom,rpmcc.h> 20 20 21 - #define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773 22 - #define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370 23 - #define QCOM_RPM_SMD_KEY_RATE 0x007a484b 24 - #define QCOM_RPM_SMD_KEY_ENABLE 0x62616e45 25 - #define QCOM_RPM_SMD_KEY_STATE 0x54415453 26 - #define QCOM_RPM_SCALING_ENABLE_ID 0x2 27 - 28 21 #define __DEFINE_CLK_SMD_RPM_PREFIX(_prefix, _name, _active, \ 29 22 type, r_id, key) \ 30 23 static struct clk_smd_rpm clk_smd_rpm_##_prefix##_active; \ ··· 162 169 struct clk_smd_rpm *peer; 163 170 struct clk_hw hw; 164 171 unsigned long rate; 165 - }; 166 - 167 - struct clk_smd_rpm_req { 168 - __le32 key; 169 - __le32 nbytes; 170 - __le32 value; 171 172 }; 172 173 173 174 struct rpm_smd_clk_desc {
+15
include/linux/soc/qcom/smd-rpm.h
··· 2 2 #ifndef __QCOM_SMD_RPM_H__ 3 3 #define __QCOM_SMD_RPM_H__ 4 4 5 + #include <linux/types.h> 6 + 5 7 struct qcom_smd_rpm; 6 8 7 9 #define QCOM_SMD_RPM_ACTIVE_STATE 0 ··· 46 44 #define QCOM_SMD_RPM_HWKM_CLK 0x6d6b7768 47 45 #define QCOM_SMD_RPM_PKA_CLK 0x616b70 48 46 #define QCOM_SMD_RPM_MCFG_CLK 0x6766636d 47 + 48 + #define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773 49 + #define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370 50 + #define QCOM_RPM_SMD_KEY_RATE 0x007a484b 51 + #define QCOM_RPM_SMD_KEY_ENABLE 0x62616e45 52 + #define QCOM_RPM_SMD_KEY_STATE 0x54415453 53 + #define QCOM_RPM_SCALING_ENABLE_ID 0x2 54 + 55 + struct clk_smd_rpm_req { 56 + __le32 key; 57 + __le32 nbytes; 58 + __le32 value; 59 + }; 49 60 50 61 int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm, 51 62 int state,