OSDN Git Service

clk: qcom: smd-rpm: drop the rpm_status_id field
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 9 Dec 2022 16:48:46 +0000 (18:48 +0200)
committerBjorn Andersson <andersson@kernel.org>
Wed, 28 Dec 2022 18:26:14 +0000 (12:26 -0600)
The rpm_status_id field is a leftover from the non-SMD clocks. It is of
no use for the SMD-RPM clock driver and is always equal to zero. Drop it
completely.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221209164855.128798-11-dmitry.baryshkov@linaro.org
drivers/clk/qcom/clk-smd-rpm.c

index f9d8382..2075cfd 100644 (file)
 #define QCOM_RPM_SMD_KEY_STATE                         0x54415453
 #define QCOM_RPM_SCALING_ENABLE_ID                     0x2
 
-#define __DEFINE_CLK_SMD_RPM(_platform, _name, _active, type, r_id, stat_id,  \
-                            key)                                             \
+#define __DEFINE_CLK_SMD_RPM(_platform, _name, _active, type, r_id, key)      \
        static struct clk_smd_rpm _platform##_##_active;                      \
        static struct clk_smd_rpm _platform##_##_name = {                     \
                .rpm_res_type = (type),                                       \
                .rpm_clk_id = (r_id),                                         \
-               .rpm_status_id = (stat_id),                                   \
                .rpm_key = (key),                                             \
                .peer = &_platform##_##_active,                               \
                .rate = INT_MAX,                                              \
@@ -48,7 +46,6 @@
        static struct clk_smd_rpm _platform##_##_active = {                   \
                .rpm_res_type = (type),                                       \
                .rpm_clk_id = (r_id),                                         \
-               .rpm_status_id = (stat_id),                                   \
                .active_only = true,                                          \
                .rpm_key = (key),                                             \
                .peer = &_platform##_##_name,                                 \
        }
 
 #define __DEFINE_CLK_SMD_RPM_BRANCH(_platform, _name, _active, type, r_id,    \
-                                   stat_id, r, key)                          \
+                                   r, key)                                   \
        static struct clk_smd_rpm _platform##_##_active;                      \
        static struct clk_smd_rpm _platform##_##_name = {                     \
                .rpm_res_type = (type),                                       \
                .rpm_clk_id = (r_id),                                         \
-               .rpm_status_id = (stat_id),                                   \
                .rpm_key = (key),                                             \
                .branch = true,                                               \
                .peer = &_platform##_##_active,                               \
@@ -88,7 +84,6 @@
        static struct clk_smd_rpm _platform##_##_active = {                   \
                .rpm_res_type = (type),                                       \
                .rpm_clk_id = (r_id),                                         \
-               .rpm_status_id = (stat_id),                                   \
                .active_only = true,                                          \
                .rpm_key = (key),                                             \
                .branch = true,                                               \
 
 #define DEFINE_CLK_SMD_RPM(_platform, _name, _active, type, r_id)            \
                __DEFINE_CLK_SMD_RPM(_platform, _name, _active, type, r_id,   \
-               0, QCOM_RPM_SMD_KEY_RATE)
+               QCOM_RPM_SMD_KEY_RATE)
 
 #define DEFINE_CLK_SMD_RPM_BRANCH(_platform, _name, _active, type, r_id, r)   \
                __DEFINE_CLK_SMD_RPM_BRANCH(_platform, _name, _active, type,  \
-               r_id, 0, r, QCOM_RPM_SMD_KEY_ENABLE)
+               r_id, r, QCOM_RPM_SMD_KEY_ENABLE)
 
 #define DEFINE_CLK_SMD_RPM_QDSS(_platform, _name, _active, type, r_id)       \
                __DEFINE_CLK_SMD_RPM(_platform, _name, _active, type, r_id,   \
-               0, QCOM_RPM_SMD_KEY_STATE)
+               QCOM_RPM_SMD_KEY_STATE)
 
 #define DEFINE_CLK_SMD_RPM_XO_BUFFER(_platform, _name, _active, r_id, r)      \
                __DEFINE_CLK_SMD_RPM_BRANCH(_platform, _name, _active,        \
-               QCOM_SMD_RPM_CLK_BUF_A, r_id, 0, r,                           \
+               QCOM_SMD_RPM_CLK_BUF_A, r_id, r,                              \
                QCOM_RPM_KEY_SOFTWARE_ENABLE)
 
 #define DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(_platform, _name, _active,              \
                                             r_id, r);                        \
                __DEFINE_CLK_SMD_RPM_BRANCH(_platform, _name##_pin,           \
                _active##_pin,                                                \
-               QCOM_SMD_RPM_CLK_BUF_A, r_id, 0, r,                           \
+               QCOM_SMD_RPM_CLK_BUF_A, r_id, r,                              \
                QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY)
 
 #define to_clk_smd_rpm(_hw) container_of(_hw, struct clk_smd_rpm, hw)
@@ -137,7 +132,6 @@ struct clk_smd_rpm {
        const int rpm_res_type;
        const int rpm_key;
        const int rpm_clk_id;
-       const int rpm_status_id;
        const bool active_only;
        bool enabled;
        bool branch;